/* Generated by Cython 0.29.28 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "cuda",
            "cuda/_cuda/loader.h"
        ],
        "extra_compile_args": [
            "-std=c++14",
            "-fpermissive",
            "-Wno-deprecated-declarations",
            "-D _GLIBCXX_ASSERTIONS",
            "-fno-var-tracking-assignments",
            "-O3"
        ],
        "include_dirs": [
            "./cuda",
            "./cuda/_cuda"
        ],
        "language": "c++",
        "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_28"
#define CYTHON_HEX_VERSION 0x001D1CF0
#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
  #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
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 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
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #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 < 0x030B00A1)
  #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
#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(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#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 <dlfcn.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":11
 * 
 * 
 * ctypedef uint32_t cuuint32_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint64_t cuuint64_t
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_cuuint32_t;

/* "cuda/ccuda.pxd":13
 * ctypedef uint32_t cuuint32_t
 * 
 * ctypedef uint64_t cuuint64_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long CUdeviceptr_v2
 */
typedef uint64_t __pyx_t_4cuda_5ccuda_cuuint64_t;

/* "cuda/ccuda.pxd":15
 * ctypedef uint64_t cuuint64_t
 * 
 * ctypedef unsigned long long CUdeviceptr_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUdeviceptr_v2 CUdeviceptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_CUdeviceptr_v2;

/* "cuda/ccuda.pxd":17
 * ctypedef unsigned long long CUdeviceptr_v2
 * 
 * ctypedef CUdeviceptr_v2 CUdeviceptr             # <<<<<<<<<<<<<<
 * 
 * ctypedef int CUdevice_v1
 */
typedef __pyx_t_4cuda_5ccuda_CUdeviceptr_v2 __pyx_t_4cuda_5ccuda_CUdeviceptr;

/* "cuda/ccuda.pxd":19
 * ctypedef CUdeviceptr_v2 CUdeviceptr
 * 
 * ctypedef int CUdevice_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUdevice_v1 CUdevice
 */
typedef int __pyx_t_4cuda_5ccuda_CUdevice_v1;

/* "cuda/ccuda.pxd":21
 * ctypedef int CUdevice_v1
 * 
 * ctypedef CUdevice_v1 CUdevice             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef __pyx_t_4cuda_5ccuda_CUdevice_v1 __pyx_t_4cuda_5ccuda_CUdevice;

/* "cuda/ccuda.pxd":73
 * ctypedef CUgraphicsResource_st* CUgraphicsResource
 * 
 * ctypedef unsigned long long CUtexObject_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUtexObject_v1 CUtexObject
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_CUtexObject_v1;

/* "cuda/ccuda.pxd":75
 * ctypedef unsigned long long CUtexObject_v1
 * 
 * ctypedef CUtexObject_v1 CUtexObject             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long CUsurfObject_v1
 */
typedef __pyx_t_4cuda_5ccuda_CUtexObject_v1 __pyx_t_4cuda_5ccuda_CUtexObject;

/* "cuda/ccuda.pxd":77
 * ctypedef CUtexObject_v1 CUtexObject
 * 
 * ctypedef unsigned long long CUsurfObject_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUsurfObject_v1 CUsurfObject
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_CUsurfObject_v1;

/* "cuda/ccuda.pxd":79
 * ctypedef unsigned long long CUsurfObject_v1
 * 
 * ctypedef CUsurfObject_v1 CUsurfObject             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef __pyx_t_4cuda_5ccuda_CUsurfObject_v1 __pyx_t_4cuda_5ccuda_CUsurfObject;

/* "cuda/ccuda.pxd":1350
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS
 * 
 * ctypedef unsigned long long CUmemGenericAllocationHandle_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle_v1;

/* "cuda/ccuda.pxd":1352
 * ctypedef unsigned long long CUmemGenericAllocationHandle_v1
 * 
 * ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationHandleType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle_v1 __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle;

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

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

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

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

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

/* "cuda/ccuda.pxd":2355
 * 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 ---*/
struct __pyx_t_4cuda_5ccuda_CUuuid_st;
struct __pyx_t_4cuda_5ccuda_CUipcEventHandle_st;
struct __pyx_t_4cuda_5ccuda_CUipcMemHandle_st;
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWaitValueParams_st;
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWriteValueParams_st;
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpFlushRemoteWritesParams_st;
union __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_union;
struct __pyx_t_4cuda_5ccuda_CUdevprop_st;
struct __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_st;
struct __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_st;
union __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_union;
union __pyx_t_4cuda_5ccuda_CUstreamAttrValue_union;
struct __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_st;
union __pyx_t_4cuda_5ccuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u;
struct __pyx_t_4cuda_5ccuda_CUexecAffinityParam_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_st;
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_st;
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_st;
struct __pyx_t_4cuda_5ccuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s;
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_st;
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s;
union __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u;
struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_st;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s;
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s;
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s;
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s;
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u;
struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s;
struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s;
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u;
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u;
struct __pyx_t_4cuda_5ccuda_CUarrayMapInfo_st;
struct __pyx_t_4cuda_5ccuda_CUmemLocation_st;
struct __pyx_t_4cuda_5ccuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s;
struct __pyx_t_4cuda_5ccuda_CUmemAllocationProp_st;
struct __pyx_t_4cuda_5ccuda_CUmemAccessDesc_st;
struct __pyx_t_4cuda_5ccuda_CUmemPoolProps_st;
struct __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS_st;
union __pyx_t_4cuda_5ccuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u;
struct __pyx_t_4cuda_5ccuda_CUeglFrame_st;

/* "cuda/ccuda.pxd":135
 * ctypedef CUipcMemHandle_v1 CUipcMemHandle
 * 
 * cdef enum CUipcMem_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUipcMem_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1
};

/* "cuda/ccuda.pxd":140
 * ctypedef CUipcMem_flags_enum CUipcMem_flags
 * 
 * cdef enum CUmemAttach_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ATTACH_GLOBAL = 1
 *     CU_MEM_ATTACH_HOST = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmemAttach_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ATTACH_GLOBAL = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_ATTACH_HOST = 2,
  __pyx_e_4cuda_5ccuda_CU_MEM_ATTACH_SINGLE = 4
};

/* "cuda/ccuda.pxd":147
 * ctypedef CUmemAttach_flags_enum CUmemAttach_flags
 * 
 * cdef enum CUctx_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_CTX_SCHED_AUTO = 0
 *     CU_CTX_SCHED_SPIN = 1
 */
enum __pyx_t_4cuda_5ccuda_CUctx_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_AUTO = 0,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_SPIN = 1,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_YIELD = 2,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_BLOCKING_SYNC = 4,
  __pyx_e_4cuda_5ccuda_CU_CTX_BLOCKING_SYNC = 4,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_MASK = 7,
  __pyx_e_4cuda_5ccuda_CU_CTX_MAP_HOST = 8,
  __pyx_e_4cuda_5ccuda_CU_CTX_LMEM_RESIZE_TO_MAX = 16,
  __pyx_e_4cuda_5ccuda_CU_CTX_FLAGS_MASK = 31
};

/* "cuda/ccuda.pxd":160
 * ctypedef CUctx_flags_enum CUctx_flags
 * 
 * cdef enum CUstream_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_DEFAULT = 0
 *     CU_STREAM_NON_BLOCKING = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstream_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_NON_BLOCKING = 1
};

/* "cuda/ccuda.pxd":166
 * ctypedef CUstream_flags_enum CUstream_flags
 * 
 * cdef enum CUevent_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_EVENT_DEFAULT = 0
 *     CU_EVENT_BLOCKING_SYNC = 1
 */
enum __pyx_t_4cuda_5ccuda_CUevent_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_EVENT_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_EVENT_BLOCKING_SYNC = 1,
  __pyx_e_4cuda_5ccuda_CU_EVENT_DISABLE_TIMING = 2,
  __pyx_e_4cuda_5ccuda_CU_EVENT_INTERPROCESS = 4
};

/* "cuda/ccuda.pxd":174
 * ctypedef CUevent_flags_enum CUevent_flags
 * 
 * cdef enum CUevent_record_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_EVENT_RECORD_DEFAULT = 0
 *     CU_EVENT_RECORD_EXTERNAL = 1
 */
enum __pyx_t_4cuda_5ccuda_CUevent_record_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_EVENT_RECORD_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_EVENT_RECORD_EXTERNAL = 1
};

/* "cuda/ccuda.pxd":180
 * ctypedef CUevent_record_flags_enum CUevent_record_flags
 * 
 * cdef enum CUevent_wait_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_EVENT_WAIT_DEFAULT = 0
 *     CU_EVENT_WAIT_EXTERNAL = 1
 */
enum __pyx_t_4cuda_5ccuda_CUevent_wait_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_EVENT_WAIT_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_EVENT_WAIT_EXTERNAL = 1
};

/* "cuda/ccuda.pxd":186
 * ctypedef CUevent_wait_flags_enum CUevent_wait_flags
 * 
 * cdef enum CUstreamWaitValue_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_WAIT_VALUE_GEQ = 0
 *     CU_STREAM_WAIT_VALUE_EQ = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamWaitValue_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_GEQ = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_EQ = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_AND = 2,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_NOR = 3,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_FLUSH = 0x40000000
};

/* "cuda/ccuda.pxd":195
 * ctypedef CUstreamWaitValue_flags_enum CUstreamWaitValue_flags
 * 
 * cdef enum CUstreamWriteValue_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_WRITE_VALUE_DEFAULT = 0
 *     CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamWriteValue_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_WRITE_VALUE_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1
};

/* "cuda/ccuda.pxd":201
 * ctypedef CUstreamWriteValue_flags_enum CUstreamWriteValue_flags
 * 
 * cdef enum CUstreamBatchMemOpType_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1
 *     CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2
 */
enum __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2,
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_WAIT_VALUE_64 = 4,
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_WRITE_VALUE_64 = 5,
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3
};

/* "cuda/ccuda.pxd":239
 * ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams
 * 
 * cdef enum CUoccupancy_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_OCCUPANCY_DEFAULT = 0
 *     CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUoccupancy_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_OCCUPANCY_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1
};

/* "cuda/ccuda.pxd":245
 * ctypedef CUoccupancy_flags_enum CUoccupancy_flags
 * 
 * cdef enum CUstreamUpdateCaptureDependencies_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_ADD_CAPTURE_DEPENDENCIES = 0
 *     CU_STREAM_SET_CAPTURE_DEPENDENCIES = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamUpdateCaptureDependencies_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ADD_CAPTURE_DEPENDENCIES = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_SET_CAPTURE_DEPENDENCIES = 1
};

/* "cuda/ccuda.pxd":251
 * ctypedef CUstreamUpdateCaptureDependencies_flags_enum CUstreamUpdateCaptureDependencies_flags
 * 
 * cdef enum CUarray_format_enum:             # <<<<<<<<<<<<<<
 *     CU_AD_FORMAT_UNSIGNED_INT8 = 1
 *     CU_AD_FORMAT_UNSIGNED_INT16 = 2
 */
enum __pyx_t_4cuda_5ccuda_CUarray_format_enum {
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8 = 1,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16 = 2,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32 = 3,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8 = 8,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16 = 9,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32 = 10,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF = 16,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT = 32,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_NV12 = 0xB0,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X1 = 0xC0,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X2 = 0xC1,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X4 = 0xC2,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X1 = 0xC3,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X2 = 0xC4,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X4 = 0xC5,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X1 = 0xC6,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X2 = 0xC7,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X4 = 0xC8,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X1 = 0xC9,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X2 = 0xCA,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X4 = 0xCB,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM = 0x91,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM_SRGB = 0x92,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM = 0x93,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM_SRGB = 0x94,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM = 0x95,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM_SRGB = 0x96,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_UNORM = 0x97,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_SNORM = 0x98,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_UNORM = 0x99,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_SNORM = 0x9A,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_UF16 = 0x9B,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_SF16 = 0x9C,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM = 0x9D,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM_SRGB = 0x9E
};

/* "cuda/ccuda.pxd":290
 * ctypedef CUarray_format_enum CUarray_format
 * 
 * cdef enum CUaddress_mode_enum:             # <<<<<<<<<<<<<<
 *     CU_TR_ADDRESS_MODE_WRAP = 0
 *     CU_TR_ADDRESS_MODE_CLAMP = 1
 */
enum __pyx_t_4cuda_5ccuda_CUaddress_mode_enum {
  __pyx_e_4cuda_5ccuda_CU_TR_ADDRESS_MODE_WRAP = 0,
  __pyx_e_4cuda_5ccuda_CU_TR_ADDRESS_MODE_CLAMP = 1,
  __pyx_e_4cuda_5ccuda_CU_TR_ADDRESS_MODE_MIRROR = 2,
  __pyx_e_4cuda_5ccuda_CU_TR_ADDRESS_MODE_BORDER = 3
};

/* "cuda/ccuda.pxd":298
 * ctypedef CUaddress_mode_enum CUaddress_mode
 * 
 * cdef enum CUfilter_mode_enum:             # <<<<<<<<<<<<<<
 *     CU_TR_FILTER_MODE_POINT = 0
 *     CU_TR_FILTER_MODE_LINEAR = 1
 */
enum __pyx_t_4cuda_5ccuda_CUfilter_mode_enum {
  __pyx_e_4cuda_5ccuda_CU_TR_FILTER_MODE_POINT = 0,
  __pyx_e_4cuda_5ccuda_CU_TR_FILTER_MODE_LINEAR = 1
};

/* "cuda/ccuda.pxd":304
 * ctypedef CUfilter_mode_enum CUfilter_mode
 * 
 * cdef enum CUdevice_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1
 *     CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2
 */
enum __pyx_t_4cuda_5ccuda_CUdevice_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = 3,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = 4,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = 6,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = 7,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = 8,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = 8,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = 9,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_WARP_SIZE = 10,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_PITCH = 11,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = 12,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = 12,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = 15,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = 17,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_INTEGRATED = 18,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = 20,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = 21,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = 22,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = 23,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = 24,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = 25,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = 26,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = 27,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = 28,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = 29,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = 27,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = 28,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = 29,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = 30,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = 31,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_ECC_ENABLED = 32,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = 33,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = 34,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TCC_DRIVER = 35,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = 36,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = 37,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = 38,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = 39,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = 40,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = 41,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = 42,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = 43,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = 44,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = 45,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = 46,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = 47,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = 48,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = 49,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = 50,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = 51,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = 52,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = 53,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = 54,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = 55,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = 56,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = 57,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = 58,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = 59,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = 60,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = 61,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = 62,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = 63,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = 64,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = 65,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = 66,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = 67,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = 68,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = 69,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = 70,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = 71,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = 72,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = 73,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = 74,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = 77,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = 78,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = 79,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = 80,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = 81,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = 82,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = 84,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = 85,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = 86,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = 87,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = 88,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = 89,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = 90,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = 91,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS = 92,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = 93,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = 94,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = 95,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = 96,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = 97,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = 98,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = 99,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = 0x64,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = 0x65,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = 0x66,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = 0x66,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = 0x67,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = 0x68,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = 0x69,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = 0x6A,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = 0x6B,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = 0x6C,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = 0x6D,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = 0x6E,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = 0x6F,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = 0x70,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = 0x71,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = 0x72,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = 0x73,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = 0x74,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = 0x75,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = 0x76,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = 0x77,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = 0x79,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX = 0x7A
};

/* "cuda/ccuda.pxd":451
 * ctypedef CUdevprop_v1 CUdevprop
 * 
 * cdef enum CUpointer_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_POINTER_ATTRIBUTE_CONTEXT = 1
 *     CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2
 */
enum __pyx_t_4cuda_5ccuda_CUpointer_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_CONTEXT = 1,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_DEVICE_POINTER = 3,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_HOST_POINTER = 4,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_P2P_TOKENS = 5,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_BUFFER_ID = 7,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_IS_MANAGED = 8,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = 10,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_RANGE_SIZE = 12,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_MAPPED = 13,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17
};

/* "cuda/ccuda.pxd":472
 * ctypedef CUpointer_attribute_enum CUpointer_attribute
 * 
 * cdef enum CUfunction_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0
 *     CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1
 */
enum __pyx_t_4cuda_5ccuda_CUfunction_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_NUM_REGS = 4,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_PTX_VERSION = 5,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_BINARY_VERSION = 6,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_MAX = 10
};

/* "cuda/ccuda.pxd":487
 * ctypedef CUfunction_attribute_enum CUfunction_attribute
 * 
 * cdef enum CUfunc_cache_enum:             # <<<<<<<<<<<<<<
 *     CU_FUNC_CACHE_PREFER_NONE = 0
 *     CU_FUNC_CACHE_PREFER_SHARED = 1
 */
enum __pyx_t_4cuda_5ccuda_CUfunc_cache_enum {
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_SHARED = 1,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_L1 = 2,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_EQUAL = 3
};

/* "cuda/ccuda.pxd":495
 * ctypedef CUfunc_cache_enum CUfunc_cache
 * 
 * cdef enum CUsharedconfig_enum:             # <<<<<<<<<<<<<<
 *     CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0
 *     CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUsharedconfig_enum {
  __pyx_e_4cuda_5ccuda_CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0,
  __pyx_e_4cuda_5ccuda_CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1,
  __pyx_e_4cuda_5ccuda_CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2
};

/* "cuda/ccuda.pxd":502
 * ctypedef CUsharedconfig_enum CUsharedconfig
 * 
 * cdef enum CUshared_carveout_enum:             # <<<<<<<<<<<<<<
 *     CU_SHAREDMEM_CARVEOUT_DEFAULT = -1
 *     CU_SHAREDMEM_CARVEOUT_MAX_SHARED = 100
 */
enum __pyx_t_4cuda_5ccuda_CUshared_carveout_enum {
  __pyx_e_4cuda_5ccuda_CU_SHAREDMEM_CARVEOUT_DEFAULT = -1L,
  __pyx_e_4cuda_5ccuda_CU_SHAREDMEM_CARVEOUT_MAX_SHARED = 0x64,
  __pyx_e_4cuda_5ccuda_CU_SHAREDMEM_CARVEOUT_MAX_L1 = 0
};

/* "cuda/ccuda.pxd":509
 * ctypedef CUshared_carveout_enum CUshared_carveout
 * 
 * cdef enum CUmemorytype_enum:             # <<<<<<<<<<<<<<
 *     CU_MEMORYTYPE_HOST = 1
 *     CU_MEMORYTYPE_DEVICE = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum {
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST = 1,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE = 2,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY = 3,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED = 4
};

/* "cuda/ccuda.pxd":517
 * ctypedef CUmemorytype_enum CUmemorytype
 * 
 * cdef enum CUcomputemode_enum:             # <<<<<<<<<<<<<<
 *     CU_COMPUTEMODE_DEFAULT = 0
 *     CU_COMPUTEMODE_PROHIBITED = 2
 */
enum __pyx_t_4cuda_5ccuda_CUcomputemode_enum {
  __pyx_e_4cuda_5ccuda_CU_COMPUTEMODE_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_COMPUTEMODE_PROHIBITED = 2,
  __pyx_e_4cuda_5ccuda_CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3
};

/* "cuda/ccuda.pxd":524
 * ctypedef CUcomputemode_enum CUcomputemode
 * 
 * cdef enum CUmem_advise_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ADVISE_SET_READ_MOSTLY = 1
 *     CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmem_advise_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_SET_READ_MOSTLY = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_SET_PREFERRED_LOCATION = 3,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = 4,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_SET_ACCESSED_BY = 5,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6
};

/* "cuda/ccuda.pxd":534
 * ctypedef CUmem_advise_enum CUmem_advise
 * 
 * cdef enum CUmem_range_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1
 *     CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmem_range_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2,
  __pyx_e_4cuda_5ccuda_CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = 3,
  __pyx_e_4cuda_5ccuda_CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4
};

/* "cuda/ccuda.pxd":542
 * ctypedef CUmem_range_attribute_enum CUmem_range_attribute
 * 
 * cdef enum CUjit_option_enum:             # <<<<<<<<<<<<<<
 *     CU_JIT_MAX_REGISTERS = 0
 *     CU_JIT_THREADS_PER_BLOCK = 1
 */
enum __pyx_t_4cuda_5ccuda_CUjit_option_enum {
  __pyx_e_4cuda_5ccuda_CU_JIT_MAX_REGISTERS = 0,
  __pyx_e_4cuda_5ccuda_CU_JIT_THREADS_PER_BLOCK = 1,
  __pyx_e_4cuda_5ccuda_CU_JIT_WALL_TIME = 2,
  __pyx_e_4cuda_5ccuda_CU_JIT_INFO_LOG_BUFFER = 3,
  __pyx_e_4cuda_5ccuda_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = 4,
  __pyx_e_4cuda_5ccuda_CU_JIT_ERROR_LOG_BUFFER = 5,
  __pyx_e_4cuda_5ccuda_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6,
  __pyx_e_4cuda_5ccuda_CU_JIT_OPTIMIZATION_LEVEL = 7,
  __pyx_e_4cuda_5ccuda_CU_JIT_TARGET_FROM_CUCONTEXT = 8,
  __pyx_e_4cuda_5ccuda_CU_JIT_TARGET = 9,
  __pyx_e_4cuda_5ccuda_CU_JIT_FALLBACK_STRATEGY = 10,
  __pyx_e_4cuda_5ccuda_CU_JIT_GENERATE_DEBUG_INFO = 11,
  __pyx_e_4cuda_5ccuda_CU_JIT_LOG_VERBOSE = 12,
  __pyx_e_4cuda_5ccuda_CU_JIT_GENERATE_LINE_INFO = 13,
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_MODE = 14,
  __pyx_e_4cuda_5ccuda_CU_JIT_NEW_SM3X_OPT = 15,
  __pyx_e_4cuda_5ccuda_CU_JIT_FAST_COMPILE = 16,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_NAMES = 17,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_ADDRESSES = 18,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_COUNT = 19,
  __pyx_e_4cuda_5ccuda_CU_JIT_LTO = 20,
  __pyx_e_4cuda_5ccuda_CU_JIT_FTZ = 21,
  __pyx_e_4cuda_5ccuda_CU_JIT_PREC_DIV = 22,
  __pyx_e_4cuda_5ccuda_CU_JIT_PREC_SQRT = 23,
  __pyx_e_4cuda_5ccuda_CU_JIT_FMA = 24,
  __pyx_e_4cuda_5ccuda_CU_JIT_NUM_OPTIONS = 25
};

/* "cuda/ccuda.pxd":572
 * ctypedef CUjit_option_enum CUjit_option
 * 
 * cdef enum CUjit_target_enum:             # <<<<<<<<<<<<<<
 *     CU_TARGET_COMPUTE_20 = 20
 *     CU_TARGET_COMPUTE_21 = 21
 */
enum __pyx_t_4cuda_5ccuda_CUjit_target_enum {
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_20 = 20,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_21 = 21,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_30 = 30,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_32 = 32,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_35 = 35,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_37 = 37,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_50 = 50,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_52 = 52,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_53 = 53,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_60 = 60,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_61 = 61,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_62 = 62,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_70 = 70,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_72 = 72,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_75 = 75,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_80 = 80,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_86 = 86
};

/* "cuda/ccuda.pxd":593
 * ctypedef CUjit_target_enum CUjit_target
 * 
 * cdef enum CUjit_fallback_enum:             # <<<<<<<<<<<<<<
 *     CU_PREFER_PTX = 0
 *     CU_PREFER_BINARY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUjit_fallback_enum {
  __pyx_e_4cuda_5ccuda_CU_PREFER_PTX = 0,
  __pyx_e_4cuda_5ccuda_CU_PREFER_BINARY = 1
};

/* "cuda/ccuda.pxd":599
 * ctypedef CUjit_fallback_enum CUjit_fallback
 * 
 * cdef enum CUjit_cacheMode_enum:             # <<<<<<<<<<<<<<
 *     CU_JIT_CACHE_OPTION_NONE = 0
 *     CU_JIT_CACHE_OPTION_CG = 1
 */
enum __pyx_t_4cuda_5ccuda_CUjit_cacheMode_enum {
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_OPTION_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_OPTION_CG = 1,
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_OPTION_CA = 2
};

/* "cuda/ccuda.pxd":606
 * ctypedef CUjit_cacheMode_enum CUjit_cacheMode
 * 
 * cdef enum CUjitInputType_enum:             # <<<<<<<<<<<<<<
 *     CU_JIT_INPUT_CUBIN = 0
 *     CU_JIT_INPUT_PTX = 1
 */
enum __pyx_t_4cuda_5ccuda_CUjitInputType_enum {
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_CUBIN = 0,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_PTX = 1,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_FATBINARY = 2,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_OBJECT = 3,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_LIBRARY = 4,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_NVVM = 5,
  __pyx_e_4cuda_5ccuda_CU_JIT_NUM_INPUT_TYPES = 6
};

/* "cuda/ccuda.pxd":622
 * ctypedef CUlinkState_st* CUlinkState
 * 
 * cdef enum CUgraphicsRegisterFlags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_REGISTER_FLAGS_NONE = 0
 *     CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 4,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8
};

/* "cuda/ccuda.pxd":631
 * ctypedef CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags
 * 
 * cdef enum CUgraphicsMapResourceFlags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphicsMapResourceFlags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
};

/* "cuda/ccuda.pxd":638
 * ctypedef CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags
 * 
 * cdef enum CUarray_cubemap_face_enum:             # <<<<<<<<<<<<<<
 *     CU_CUBEMAP_FACE_POSITIVE_X = 0
 *     CU_CUBEMAP_FACE_NEGATIVE_X = 1
 */
enum __pyx_t_4cuda_5ccuda_CUarray_cubemap_face_enum {
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_X = 0,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_X = 1,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_Y = 2,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_Y = 3,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_Z = 4,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_Z = 5
};

/* "cuda/ccuda.pxd":648
 * ctypedef CUarray_cubemap_face_enum CUarray_cubemap_face
 * 
 * cdef enum CUlimit_enum:             # <<<<<<<<<<<<<<
 *     CU_LIMIT_STACK_SIZE = 0
 *     CU_LIMIT_PRINTF_FIFO_SIZE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUlimit_enum {
  __pyx_e_4cuda_5ccuda_CU_LIMIT_STACK_SIZE = 0,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_PRINTF_FIFO_SIZE = 1,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MALLOC_HEAP_SIZE = 2,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 3,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 4,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 5,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_PERSISTING_L2_CACHE_SIZE = 6,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MAX = 7
};

/* "cuda/ccuda.pxd":660
 * ctypedef CUlimit_enum CUlimit
 * 
 * cdef enum CUresourcetype_enum:             # <<<<<<<<<<<<<<
 *     CU_RESOURCE_TYPE_ARRAY = 0
 *     CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUresourcetype_enum {
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_ARRAY = 0,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_LINEAR = 2,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_PITCH2D = 3
};

/* "cuda/ccuda.pxd":670
 * ctypedef void (*CUhostFn)(void* userData)
 * 
 * cdef enum CUaccessProperty_enum:             # <<<<<<<<<<<<<<
 *     CU_ACCESS_PROPERTY_NORMAL = 0
 *     CU_ACCESS_PROPERTY_STREAMING = 1
 */
enum __pyx_t_4cuda_5ccuda_CUaccessProperty_enum {
  __pyx_e_4cuda_5ccuda_CU_ACCESS_PROPERTY_NORMAL = 0,
  __pyx_e_4cuda_5ccuda_CU_ACCESS_PROPERTY_STREAMING = 1,
  __pyx_e_4cuda_5ccuda_CU_ACCESS_PROPERTY_PERSISTING = 2
};

/* "cuda/ccuda.pxd":724
 * ctypedef CUDA_HOST_NODE_PARAMS_v1 CUDA_HOST_NODE_PARAMS
 * 
 * cdef enum CUgraphNodeType_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_NODE_TYPE_KERNEL = 0
 *     CU_GRAPH_NODE_TYPE_MEMCPY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphNodeType_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_KERNEL = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_MEMCPY = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_MEMSET = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_HOST = 3,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_GRAPH = 4,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_EMPTY = 5,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_WAIT_EVENT = 6,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_EVENT_RECORD = 7,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = 8,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = 9,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_MEM_ALLOC = 10,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_MEM_FREE = 11
};

/* "cuda/ccuda.pxd":740
 * ctypedef CUgraphNodeType_enum CUgraphNodeType
 * 
 * cdef enum CUsynchronizationPolicy_enum:             # <<<<<<<<<<<<<<
 *     CU_SYNC_POLICY_AUTO = 1
 *     CU_SYNC_POLICY_SPIN = 2
 */
enum __pyx_t_4cuda_5ccuda_CUsynchronizationPolicy_enum {
  __pyx_e_4cuda_5ccuda_CU_SYNC_POLICY_AUTO = 1,
  __pyx_e_4cuda_5ccuda_CU_SYNC_POLICY_SPIN = 2,
  __pyx_e_4cuda_5ccuda_CU_SYNC_POLICY_YIELD = 3,
  __pyx_e_4cuda_5ccuda_CU_SYNC_POLICY_BLOCKING_SYNC = 4
};

/* "cuda/ccuda.pxd":748
 * ctypedef CUsynchronizationPolicy_enum CUsynchronizationPolicy
 * 
 * cdef enum CUkernelNodeAttrID_enum:             # <<<<<<<<<<<<<<
 *     CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 *     CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
 */
enum __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID_enum {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1,
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
};

/* "cuda/ccuda.pxd":762
 * ctypedef CUkernelNodeAttrValue_v1 CUkernelNodeAttrValue
 * 
 * cdef enum CUstreamCaptureStatus_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_CAPTURE_STATUS_NONE = 0
 *     CU_STREAM_CAPTURE_STATUS_ACTIVE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_ACTIVE = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2
};

/* "cuda/ccuda.pxd":769
 * ctypedef CUstreamCaptureStatus_enum CUstreamCaptureStatus
 * 
 * cdef enum CUstreamCaptureMode_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_CAPTURE_MODE_GLOBAL = 0
 *     CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamCaptureMode_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_MODE_GLOBAL = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_MODE_RELAXED = 2
};

/* "cuda/ccuda.pxd":776
 * ctypedef CUstreamCaptureMode_enum CUstreamCaptureMode
 * 
 * cdef enum CUstreamAttrID_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 *     CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 */
enum __pyx_t_4cuda_5ccuda_CUstreamAttrID_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
};

/* "cuda/ccuda.pxd":790
 * ctypedef CUstreamAttrValue_v1 CUstreamAttrValue
 * 
 * cdef enum CUdriverProcAddress_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GET_PROC_ADDRESS_DEFAULT = 0
 *     CU_GET_PROC_ADDRESS_LEGACY_STREAM = 1
 */
enum __pyx_t_4cuda_5ccuda_CUdriverProcAddress_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_LEGACY_STREAM = 1,
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = 2
};

/* "cuda/ccuda.pxd":797
 * ctypedef CUdriverProcAddress_flags_enum CUdriverProcAddress_flags
 * 
 * cdef enum CUexecAffinityType_enum:             # <<<<<<<<<<<<<<
 *     CU_EXEC_AFFINITY_TYPE_SM_COUNT = 0
 *     CU_EXEC_AFFINITY_TYPE_MAX = 1
 */
enum __pyx_t_4cuda_5ccuda_CUexecAffinityType_enum {
  __pyx_e_4cuda_5ccuda_CU_EXEC_AFFINITY_TYPE_SM_COUNT = 0,
  __pyx_e_4cuda_5ccuda_CU_EXEC_AFFINITY_TYPE_MAX = 1
};

/* "cuda/ccuda.pxd":821
 * ctypedef CUexecAffinityParam_v1 CUexecAffinityParam
 * 
 * cdef enum cudaError_enum:             # <<<<<<<<<<<<<<
 *     CUDA_SUCCESS = 0
 *     CUDA_ERROR_INVALID_VALUE = 1
 */
enum __pyx_t_4cuda_5ccuda_cudaError_enum {
  __pyx_e_4cuda_5ccuda_CUDA_SUCCESS = 0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_VALUE = 1,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_OUT_OF_MEMORY = 2,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_INITIALIZED = 3,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_DEINITIALIZED = 4,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PROFILER_DISABLED = 5,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PROFILER_NOT_INITIALIZED = 6,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PROFILER_ALREADY_STARTED = 7,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PROFILER_ALREADY_STOPPED = 8,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STUB_LIBRARY = 34,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NO_DEVICE = 0x64,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_DEVICE = 0x65,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_DEVICE_NOT_LICENSED = 0x66,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_IMAGE = 0xC8,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_CONTEXT = 0xC9,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_CONTEXT_ALREADY_CURRENT = 0xCA,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MAP_FAILED = 0xCD,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNMAP_FAILED = 0xCE,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ARRAY_IS_MAPPED = 0xCF,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ALREADY_MAPPED = 0xD0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NO_BINARY_FOR_GPU = 0xD1,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ALREADY_ACQUIRED = 0xD2,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_MAPPED = 0xD3,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_MAPPED_AS_ARRAY = 0xD4,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_MAPPED_AS_POINTER = 0xD5,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ECC_UNCORRECTABLE = 0xD6,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNSUPPORTED_LIMIT = 0xD7,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_CONTEXT_ALREADY_IN_USE = 0xD8,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = 0xD9,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_PTX = 0xDA,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 0xDB,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NVLINK_UNCORRECTABLE = 0xDC,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_JIT_COMPILER_NOT_FOUND = 0xDD,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNSUPPORTED_PTX_VERSION = 0xDE,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_JIT_COMPILATION_DISABLED = 0xDF,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = 0xE0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_SOURCE = 0x12C,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_FILE_NOT_FOUND = 0x12D,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 0x12E,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = 0x12F,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_OPERATING_SYSTEM = 0x130,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_HANDLE = 0x190,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ILLEGAL_STATE = 0x191,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND = 0x1F4,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_READY = 0x258,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ILLEGAL_ADDRESS = 0x2BC,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = 0x2BD,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_LAUNCH_TIMEOUT = 0x2BE,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = 0x2BF,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = 0x2C0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = 0x2C1,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = 0x2C4,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_CONTEXT_IS_DESTROYED = 0x2C5,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ASSERT = 0x2C6,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_TOO_MANY_PEERS = 0x2C7,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = 0x2C8,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = 0x2C9,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_HARDWARE_STACK_ERROR = 0x2CA,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ILLEGAL_INSTRUCTION = 0x2CB,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MISALIGNED_ADDRESS = 0x2CC,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_ADDRESS_SPACE = 0x2CD,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_PC = 0x2CE,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_LAUNCH_FAILED = 0x2CF,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = 0x2D0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_PERMITTED = 0x320,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_SUPPORTED = 0x321,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_SYSTEM_NOT_READY = 0x322,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = 0x323,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = 0x324,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_CONNECTION_FAILED = 0x325,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_RPC_FAILURE = 0x326,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_SERVER_NOT_READY = 0x327,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = 0x328,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = 0x329,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = 0x384,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = 0x385,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_MERGE = 0x386,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = 0x387,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_UNJOINED = 0x388,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_ISOLATION = 0x389,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = 0x38A,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_CAPTURED_EVENT = 0x38B,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = 0x38C,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_TIMEOUT = 0x38D,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = 0x38E,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_EXTERNAL_DEVICE = 0x38F,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNKNOWN = 0x3E7
};

/* "cuda/ccuda.pxd":912
 * ctypedef cudaError_enum CUresult
 * 
 * cdef enum CUdevice_P2PAttribute_enum:             # <<<<<<<<<<<<<<
 *     CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1
 *     CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2
 */
enum __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute_enum {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 3,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = 4,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 4
};

/* "cuda/ccuda.pxd":1111
 * ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC
 * 
 * cdef enum CUresourceViewFormat_enum:             # <<<<<<<<<<<<<<
 *     CU_RES_VIEW_FORMAT_NONE = 0
 *     CU_RES_VIEW_FORMAT_UINT_1X8 = 1
 */
enum __pyx_t_4cuda_5ccuda_CUresourceViewFormat_enum {
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X8 = 1,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X8 = 2,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X8 = 3,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X8 = 4,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X8 = 5,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X8 = 6,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X16 = 7,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X16 = 8,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X16 = 9,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X16 = 10,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X16 = 11,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X16 = 12,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X32 = 13,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X32 = 14,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X32 = 15,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X32 = 16,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X32 = 17,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X32 = 18,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_1X16 = 19,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_2X16 = 20,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_4X16 = 21,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_1X32 = 22,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_2X32 = 23,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_4X32 = 24,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC4 = 29,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC5 = 31,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC6H = 33,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34
};

/* "cuda/ccuda.pxd":1173
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 CUDA_POINTER_ATTRIBUTE_P2P_TOKENS
 * 
 * cdef enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum:             # <<<<<<<<<<<<<<
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = 0
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = 1
 */
enum __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum {
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = 1,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = 3
};

/* "cuda/ccuda.pxd":1196
 * ctypedef CUDA_LAUNCH_PARAMS_v1 CUDA_LAUNCH_PARAMS
 * 
 * cdef enum CUexternalMemoryHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2
 */
enum __pyx_t_4cuda_5ccuda_CUexternalMemoryHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = 4,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = 5,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = 6,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = 7,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8
};

/* "cuda/ccuda.pxd":1248
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC
 * 
 * cdef enum CUexternalSemaphoreHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2
 */
enum __pyx_t_4cuda_5ccuda_CUexternalSemaphoreHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = 4,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = 5,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = 6,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = 7,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = 8,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = 9,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = 10
};

/* "cuda/ccuda.pxd":1354
 * ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle
 * 
 * cdef enum CUmemAllocationHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_HANDLE_TYPE_NONE = 0
 *     CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_WIN32 = 2,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_WIN32_KMT = 4,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_MAX = 0x7FFFFFFF
};

/* "cuda/ccuda.pxd":1363
 * ctypedef CUmemAllocationHandleType_enum CUmemAllocationHandleType
 * 
 * cdef enum CUmemAccess_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ACCESS_FLAGS_PROT_NONE = 0
 *     CU_MEM_ACCESS_FLAGS_PROT_READ = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAccess_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ACCESS_FLAGS_PROT_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ACCESS_FLAGS_PROT_READ = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_ACCESS_FLAGS_PROT_READWRITE = 3,
  __pyx_e_4cuda_5ccuda_CU_MEM_ACCESS_FLAGS_PROT_MAX = 0x7FFFFFFF
};

/* "cuda/ccuda.pxd":1371
 * ctypedef CUmemAccess_flags_enum CUmemAccess_flags
 * 
 * cdef enum CUmemLocationType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_LOCATION_TYPE_INVALID = 0
 *     CU_MEM_LOCATION_TYPE_DEVICE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemLocationType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_LOCATION_TYPE_INVALID = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_LOCATION_TYPE_DEVICE = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_LOCATION_TYPE_MAX = 0x7FFFFFFF
};

/* "cuda/ccuda.pxd":1378
 * ctypedef CUmemLocationType_enum CUmemLocationType
 * 
 * cdef enum CUmemAllocationType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ALLOCATION_TYPE_INVALID = 0
 *     CU_MEM_ALLOCATION_TYPE_PINNED = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_TYPE_INVALID = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_TYPE_PINNED = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_TYPE_MAX = 0x7FFFFFFF
};

/* "cuda/ccuda.pxd":1385
 * ctypedef CUmemAllocationType_enum CUmemAllocationType
 * 
 * cdef enum CUmemAllocationGranularity_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0
 *     CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1
};

/* "cuda/ccuda.pxd":1391
 * ctypedef CUmemAllocationGranularity_flags_enum CUmemAllocationGranularity_flags
 * 
 * cdef enum CUarraySparseSubresourceType_enum:             # <<<<<<<<<<<<<<
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1
 */
enum __pyx_t_4cuda_5ccuda_CUarraySparseSubresourceType_enum {
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0,
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1
};

/* "cuda/ccuda.pxd":1397
 * ctypedef CUarraySparseSubresourceType_enum CUarraySparseSubresourceType
 * 
 * cdef enum CUmemOperationType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_OPERATION_TYPE_MAP = 1
 *     CU_MEM_OPERATION_TYPE_UNMAP = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmemOperationType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_OPERATION_TYPE_MAP = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_OPERATION_TYPE_UNMAP = 2
};

/* "cuda/ccuda.pxd":1403
 * ctypedef CUmemOperationType_enum CUmemOperationType
 * 
 * cdef enum CUmemHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_HANDLE_TYPE_GENERIC = 0
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUmemHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_GENERIC = 0
};

/* "cuda/ccuda.pxd":1459
 * ctypedef CUmemLocation_v1 CUmemLocation
 * 
 * cdef enum CUmemAllocationCompType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ALLOCATION_COMP_NONE = 0
 *     CU_MEM_ALLOCATION_COMP_GENERIC = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationCompType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_COMP_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_COMP_GENERIC = 1
};

/* "cuda/ccuda.pxd":1490
 * ctypedef CUmemAccessDesc_v1 CUmemAccessDesc
 * 
 * cdef enum CUgraphExecUpdateResult_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_EXEC_UPDATE_SUCCESS = 0
 *     CU_GRAPH_EXEC_UPDATE_ERROR = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_SUCCESS = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = 3,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = 4,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = 5,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = 6,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = 7,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = 8
};

/* "cuda/ccuda.pxd":1503
 * ctypedef CUgraphExecUpdateResult_enum CUgraphExecUpdateResult
 * 
 * cdef enum CUmemPool_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = 1
 *     CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmemPool_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = 1,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = 2,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = 3,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = 4,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = 5,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = 6,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_USED_MEM_CURRENT = 7,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_USED_MEM_HIGH = 8
};

/* "cuda/ccuda.pxd":1542
 * ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_st CUDA_MEM_ALLOC_NODE_PARAMS
 * 
 * cdef enum CUgraphMem_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = 0
 *     CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphMem_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = 3
};

/* "cuda/ccuda.pxd":1550
 * ctypedef CUgraphMem_attribute_enum CUgraphMem_attribute
 * 
 * cdef enum CUflushGPUDirectRDMAWritesOptions_enum:             # <<<<<<<<<<<<<<
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = 1
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 2
 */
enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions_enum {
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = 1,
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 2
};

/* "cuda/ccuda.pxd":1556
 * ctypedef CUflushGPUDirectRDMAWritesOptions_enum CUflushGPUDirectRDMAWritesOptions
 * 
 * cdef enum CUGPUDirectRDMAWritesOrdering_enum:             # <<<<<<<<<<<<<<
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = 0
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = 100
 */
enum __pyx_t_4cuda_5ccuda_CUGPUDirectRDMAWritesOrdering_enum {
  __pyx_e_4cuda_5ccuda_CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = 0x64,
  __pyx_e_4cuda_5ccuda_CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = 0xC8
};

/* "cuda/ccuda.pxd":1563
 * ctypedef CUGPUDirectRDMAWritesOrdering_enum CUGPUDirectRDMAWritesOrdering
 * 
 * cdef enum CUflushGPUDirectRDMAWritesScope_enum:             # <<<<<<<<<<<<<<
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = 100
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 200
 */
enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope_enum {
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = 0x64,
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 0xC8
};

/* "cuda/ccuda.pxd":1569
 * ctypedef CUflushGPUDirectRDMAWritesScope_enum CUflushGPUDirectRDMAWritesScope
 * 
 * cdef enum CUflushGPUDirectRDMAWritesTarget_enum:             # <<<<<<<<<<<<<<
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget_enum {
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0
};

/* "cuda/ccuda.pxd":1574
 * ctypedef CUflushGPUDirectRDMAWritesTarget_enum CUflushGPUDirectRDMAWritesTarget
 * 
 * cdef enum CUgraphDebugDot_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = 1
 *     CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = 2
 */
enum __pyx_t_4cuda_5ccuda_CUgraphDebugDot_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = 4,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = 8,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = 16,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = 32,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = 64,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = 0x80,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = 0x100,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = 0x200,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = 0x400,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = 0x800,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = 0x1000
};

/* "cuda/ccuda.pxd":1591
 * ctypedef CUgraphDebugDot_flags_enum CUgraphDebugDot_flags
 * 
 * cdef enum CUuserObject_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = 1
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUuserObject_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = 1
};

/* "cuda/ccuda.pxd":1596
 * ctypedef CUuserObject_flags_enum CUuserObject_flags
 * 
 * cdef enum CUuserObjectRetain_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_USER_OBJECT_MOVE = 1
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUuserObjectRetain_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_USER_OBJECT_MOVE = 1
};

/* "cuda/ccuda.pxd":1601
 * ctypedef CUuserObjectRetain_flags_enum CUuserObjectRetain_flags
 * 
 * cdef enum CUgraphInstantiate_flags_enum:             # <<<<<<<<<<<<<<
 *     CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUgraphInstantiate_flags_enum {
  __pyx_e_4cuda_5ccuda_CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1
};

/* "cuda/ccuda.pxd":2314
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * cdef enum CUoutput_mode_enum:             # <<<<<<<<<<<<<<
 *     CU_OUT_KEY_VALUE_PAIR = 0
 *     CU_OUT_CSV = 1
 */
enum __pyx_t_4cuda_5ccuda_CUoutput_mode_enum {
  __pyx_e_4cuda_5ccuda_CU_OUT_KEY_VALUE_PAIR = 0,
  __pyx_e_4cuda_5ccuda_CU_OUT_CSV = 1
};

/* "cuda/ccuda.pxd":2365
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * 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":2371
 * 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":2377
 * 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":2549
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * 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":2558
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * 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":2565
 * ctypedef CUGLmap_flags_enum CUGLmap_flags
 * 
 * cdef enum: CUDA_VERSION = 11060             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_VERSION = 0x2B34
};

/* "cuda/ccuda.pxd":2567
 * cdef enum: CUDA_VERSION = 11060
 * 
 * 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":2569
 * 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":2571
 * cdef enum: CU_STREAM_LEGACY = 1
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_PER_THREAD = 2
};

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

/* "cuda/ccuda.pxd":2575
 * 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":2577
 * 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":2579
 * 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":2581
 * 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":2583
 * 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":2585
 * 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":2587
 * 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":2589
 * 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":2591
 * 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":2593
 * 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":2595
 * 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":2597
 * 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":2599
 * 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":2601
 * 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":2603
 * 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":2605
 * 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":2607
 * 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":2609
 * 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":2611
 * 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":2613
 * 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":2615
 * 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":2617
 * 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":2619
 * 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":2621
 * 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":2623
 * 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":2625
 * 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":2627
 * 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":2629
 * 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":2631
 * 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":2633
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32
 * 
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_END = 0
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_SEAMLESS_CUBEMAP = 64
};

/* "cuda/ccuda.pxd":2635
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64
 * 
 * cdef enum: CU_LAUNCH_PARAM_END = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END = 0
};

/* "cuda/ccuda.pxd":2637
 * cdef enum: CU_LAUNCH_PARAM_END = 0
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER = 1
};

/* "cuda/ccuda.pxd":2639
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1
 * 
 * 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":2641
 * 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":2643
 * 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":2645
 * 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":2647
 * 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":2649
 * 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":26
 *     cdef struct CUctx_st:
 *         pass
 * ctypedef CUctx_st* CUcontext             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUctx_st *__pyx_t_4cuda_5ccuda_CUcontext;

/* "cuda/ccuda.pxd":31
 *     cdef struct CUmod_st:
 *         pass
 * ctypedef CUmod_st* CUmodule             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUmod_st *__pyx_t_4cuda_5ccuda_CUmodule;

/* "cuda/ccuda.pxd":36
 *     cdef struct CUfunc_st:
 *         pass
 * ctypedef CUfunc_st* CUfunction             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUfunc_st *__pyx_t_4cuda_5ccuda_CUfunction;

/* "cuda/ccuda.pxd":41
 *     cdef struct CUarray_st:
 *         pass
 * ctypedef CUarray_st* CUarray             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUarray_st *__pyx_t_4cuda_5ccuda_CUarray;

/* "cuda/ccuda.pxd":46
 *     cdef struct CUmipmappedArray_st:
 *         pass
 * ctypedef CUmipmappedArray_st* CUmipmappedArray             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUmipmappedArray_st *__pyx_t_4cuda_5ccuda_CUmipmappedArray;

/* "cuda/ccuda.pxd":51
 *     cdef struct CUtexref_st:
 *         pass
 * ctypedef CUtexref_st* CUtexref             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUtexref_st *__pyx_t_4cuda_5ccuda_CUtexref;

/* "cuda/ccuda.pxd":56
 *     cdef struct CUsurfref_st:
 *         pass
 * ctypedef CUsurfref_st* CUsurfref             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUsurfref_st *__pyx_t_4cuda_5ccuda_CUsurfref;

/* "cuda/ccuda.pxd":61
 *     cdef struct CUevent_st:
 *         pass
 * ctypedef CUevent_st* CUevent             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUevent_st *__pyx_t_4cuda_5ccuda_CUevent;

/* "cuda/ccuda.pxd":66
 *     cdef struct CUstream_st:
 *         pass
 * ctypedef CUstream_st* CUstream             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUstream_st *__pyx_t_4cuda_5ccuda_CUstream;

/* "cuda/ccuda.pxd":71
 *     cdef struct CUgraphicsResource_st:
 *         pass
 * ctypedef CUgraphicsResource_st* CUgraphicsResource             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long CUtexObject_v1
 */
typedef struct CUgraphicsResource_st *__pyx_t_4cuda_5ccuda_CUgraphicsResource;

/* "cuda/ccuda.pxd":84
 *     cdef struct CUextMemory_st:
 *         pass
 * ctypedef CUextMemory_st* CUexternalMemory             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUextMemory_st *__pyx_t_4cuda_5ccuda_CUexternalMemory;

/* "cuda/ccuda.pxd":89
 *     cdef struct CUextSemaphore_st:
 *         pass
 * ctypedef CUextSemaphore_st* CUexternalSemaphore             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUextSemaphore_st *__pyx_t_4cuda_5ccuda_CUexternalSemaphore;

/* "cuda/ccuda.pxd":94
 *     cdef struct CUgraph_st:
 *         pass
 * ctypedef CUgraph_st* CUgraph             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUgraph_st *__pyx_t_4cuda_5ccuda_CUgraph;

/* "cuda/ccuda.pxd":99
 *     cdef struct CUgraphNode_st:
 *         pass
 * ctypedef CUgraphNode_st* CUgraphNode             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUgraphNode_st *__pyx_t_4cuda_5ccuda_CUgraphNode;

/* "cuda/ccuda.pxd":104
 *     cdef struct CUgraphExec_st:
 *         pass
 * ctypedef CUgraphExec_st* CUgraphExec             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUgraphExec_st *__pyx_t_4cuda_5ccuda_CUgraphExec;

/* "cuda/ccuda.pxd":109
 *     cdef struct CUmemPoolHandle_st:
 *         pass
 * ctypedef CUmemPoolHandle_st* CUmemoryPool             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUmemPoolHandle_st *__pyx_t_4cuda_5ccuda_CUmemoryPool;

/* "cuda/ccuda.pxd":114
 *     cdef struct CUuserObject_st:
 *         pass
 * ctypedef CUuserObject_st* CUuserObject             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUuuid_st:
 */
typedef struct CUuserObject_st *__pyx_t_4cuda_5ccuda_CUuserObject;

/* "cuda/ccuda.pxd":116
 * ctypedef CUuserObject_st* CUuserObject
 * 
 * cdef struct CUuuid_st:             # <<<<<<<<<<<<<<
 *     char bytes[16]
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUuuid_st {
  char bytes[16];
};

/* "cuda/ccuda.pxd":119
 *     char bytes[16]
 * 
 * ctypedef CUuuid_st CUuuid             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUipcEventHandle_st:
 */
typedef struct __pyx_t_4cuda_5ccuda_CUuuid_st __pyx_t_4cuda_5ccuda_CUuuid;

/* "cuda/ccuda.pxd":121
 * ctypedef CUuuid_st CUuuid
 * 
 * cdef struct CUipcEventHandle_st:             # <<<<<<<<<<<<<<
 *     char reserved[64]
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUipcEventHandle_st {
  char reserved[64];
};

/* "cuda/ccuda.pxd":124
 *     char reserved[64]
 * 
 * ctypedef CUipcEventHandle_st CUipcEventHandle_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUipcEventHandle_v1 CUipcEventHandle
 */
typedef struct __pyx_t_4cuda_5ccuda_CUipcEventHandle_st __pyx_t_4cuda_5ccuda_CUipcEventHandle_v1;

/* "cuda/ccuda.pxd":126
 * ctypedef CUipcEventHandle_st CUipcEventHandle_v1
 * 
 * ctypedef CUipcEventHandle_v1 CUipcEventHandle             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUipcMemHandle_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUipcEventHandle_v1 __pyx_t_4cuda_5ccuda_CUipcEventHandle;

/* "cuda/ccuda.pxd":128
 * ctypedef CUipcEventHandle_v1 CUipcEventHandle
 * 
 * cdef struct CUipcMemHandle_st:             # <<<<<<<<<<<<<<
 *     char reserved[64]
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUipcMemHandle_st {
  char reserved[64];
};

/* "cuda/ccuda.pxd":131
 *     char reserved[64]
 * 
 * ctypedef CUipcMemHandle_st CUipcMemHandle_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUipcMemHandle_v1 CUipcMemHandle
 */
typedef struct __pyx_t_4cuda_5ccuda_CUipcMemHandle_st __pyx_t_4cuda_5ccuda_CUipcMemHandle_v1;

/* "cuda/ccuda.pxd":133
 * ctypedef CUipcMemHandle_st CUipcMemHandle_v1
 * 
 * ctypedef CUipcMemHandle_v1 CUipcMemHandle             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUipcMem_flags_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUipcMemHandle_v1 __pyx_t_4cuda_5ccuda_CUipcMemHandle;

/* "cuda/ccuda.pxd":138
 *     CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1
 * 
 * ctypedef CUipcMem_flags_enum CUipcMem_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAttach_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUipcMem_flags_enum __pyx_t_4cuda_5ccuda_CUipcMem_flags;

/* "cuda/ccuda.pxd":145
 *     CU_MEM_ATTACH_SINGLE = 4
 * 
 * ctypedef CUmemAttach_flags_enum CUmemAttach_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUctx_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAttach_flags_enum __pyx_t_4cuda_5ccuda_CUmemAttach_flags;

/* "cuda/ccuda.pxd":158
 *     CU_CTX_FLAGS_MASK = 31
 * 
 * ctypedef CUctx_flags_enum CUctx_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstream_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUctx_flags_enum __pyx_t_4cuda_5ccuda_CUctx_flags;

/* "cuda/ccuda.pxd":164
 *     CU_STREAM_NON_BLOCKING = 1
 * 
 * ctypedef CUstream_flags_enum CUstream_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUevent_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstream_flags_enum __pyx_t_4cuda_5ccuda_CUstream_flags;

/* "cuda/ccuda.pxd":172
 *     CU_EVENT_INTERPROCESS = 4
 * 
 * ctypedef CUevent_flags_enum CUevent_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUevent_record_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUevent_flags_enum __pyx_t_4cuda_5ccuda_CUevent_flags;

/* "cuda/ccuda.pxd":178
 *     CU_EVENT_RECORD_EXTERNAL = 1
 * 
 * ctypedef CUevent_record_flags_enum CUevent_record_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUevent_wait_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUevent_record_flags_enum __pyx_t_4cuda_5ccuda_CUevent_record_flags;

/* "cuda/ccuda.pxd":184
 *     CU_EVENT_WAIT_EXTERNAL = 1
 * 
 * ctypedef CUevent_wait_flags_enum CUevent_wait_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamWaitValue_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUevent_wait_flags_enum __pyx_t_4cuda_5ccuda_CUevent_wait_flags;

/* "cuda/ccuda.pxd":193
 *     CU_STREAM_WAIT_VALUE_FLUSH = 1073741824
 * 
 * ctypedef CUstreamWaitValue_flags_enum CUstreamWaitValue_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamWriteValue_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamWaitValue_flags_enum __pyx_t_4cuda_5ccuda_CUstreamWaitValue_flags;

/* "cuda/ccuda.pxd":199
 *     CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1
 * 
 * ctypedef CUstreamWriteValue_flags_enum CUstreamWriteValue_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamBatchMemOpType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamWriteValue_flags_enum __pyx_t_4cuda_5ccuda_CUstreamWriteValue_flags;

/* "cuda/ccuda.pxd":208
 *     CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3
 * 
 * ctypedef CUstreamBatchMemOpType_enum CUstreamBatchMemOpType             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUstreamMemOpWaitValueParams_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType_enum __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType;

/* "cuda/ccuda.pxd":210
 * ctypedef CUstreamBatchMemOpType_enum CUstreamBatchMemOpType
 * 
 * cdef struct CUstreamMemOpWaitValueParams_st:             # <<<<<<<<<<<<<<
 *     CUstreamBatchMemOpType operation
 *     CUdeviceptr address
 */
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWaitValueParams_st {
  __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType operation;
  __pyx_t_4cuda_5ccuda_CUdeviceptr address;
  __pyx_t_4cuda_5ccuda_cuuint64_t value64;
  unsigned int flags;
  __pyx_t_4cuda_5ccuda_CUdeviceptr alias;
};

/* "cuda/ccuda.pxd":217
 *     CUdeviceptr alias
 * 
 * cdef struct CUstreamMemOpWriteValueParams_st:             # <<<<<<<<<<<<<<
 *     CUstreamBatchMemOpType operation
 *     CUdeviceptr address
 */
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWriteValueParams_st {
  __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType operation;
  __pyx_t_4cuda_5ccuda_CUdeviceptr address;
  __pyx_t_4cuda_5ccuda_cuuint64_t value64;
  unsigned int flags;
  __pyx_t_4cuda_5ccuda_CUdeviceptr alias;
};

/* "cuda/ccuda.pxd":224
 *     CUdeviceptr alias
 * 
 * cdef struct CUstreamMemOpFlushRemoteWritesParams_st:             # <<<<<<<<<<<<<<
 *     CUstreamBatchMemOpType operation
 *     unsigned int flags
 */
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpFlushRemoteWritesParams_st {
  __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType operation;
  unsigned int flags;
};

/* "cuda/ccuda.pxd":228
 *     unsigned int flags
 * 
 * cdef union CUstreamBatchMemOpParams_union:             # <<<<<<<<<<<<<<
 *     CUstreamBatchMemOpType operation
 *     CUstreamMemOpWaitValueParams_st waitValue
 */
union __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_union {
  __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType operation;
  struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWaitValueParams_st waitValue;
  struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWriteValueParams_st writeValue;
  struct __pyx_t_4cuda_5ccuda_CUstreamMemOpFlushRemoteWritesParams_st flushRemoteWrites;
  __pyx_t_4cuda_5ccuda_cuuint64_t pad[6];
};

/* "cuda/ccuda.pxd":235
 *     cuuint64_t pad[6]
 * 
 * ctypedef CUstreamBatchMemOpParams_union CUstreamBatchMemOpParams_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams
 */
typedef union __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_union __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_v1;

/* "cuda/ccuda.pxd":237
 * ctypedef CUstreamBatchMemOpParams_union CUstreamBatchMemOpParams_v1
 * 
 * ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUoccupancy_flags_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_v1 __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams;

/* "cuda/ccuda.pxd":243
 *     CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1
 * 
 * ctypedef CUoccupancy_flags_enum CUoccupancy_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamUpdateCaptureDependencies_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUoccupancy_flags_enum __pyx_t_4cuda_5ccuda_CUoccupancy_flags;

/* "cuda/ccuda.pxd":249
 *     CU_STREAM_SET_CAPTURE_DEPENDENCIES = 1
 * 
 * ctypedef CUstreamUpdateCaptureDependencies_flags_enum CUstreamUpdateCaptureDependencies_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUarray_format_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamUpdateCaptureDependencies_flags_enum __pyx_t_4cuda_5ccuda_CUstreamUpdateCaptureDependencies_flags;

/* "cuda/ccuda.pxd":288
 *     CU_AD_FORMAT_BC7_UNORM_SRGB = 158
 * 
 * ctypedef CUarray_format_enum CUarray_format             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUaddress_mode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUarray_format_enum __pyx_t_4cuda_5ccuda_CUarray_format;

/* "cuda/ccuda.pxd":296
 *     CU_TR_ADDRESS_MODE_BORDER = 3
 * 
 * ctypedef CUaddress_mode_enum CUaddress_mode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUfilter_mode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUaddress_mode_enum __pyx_t_4cuda_5ccuda_CUaddress_mode;

/* "cuda/ccuda.pxd":302
 *     CU_TR_FILTER_MODE_LINEAR = 1
 * 
 * ctypedef CUfilter_mode_enum CUfilter_mode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUdevice_attribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUfilter_mode_enum __pyx_t_4cuda_5ccuda_CUfilter_mode;

/* "cuda/ccuda.pxd":433
 *     CU_DEVICE_ATTRIBUTE_MAX = 122
 * 
 * ctypedef CUdevice_attribute_enum CUdevice_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUdevprop_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUdevice_attribute_enum __pyx_t_4cuda_5ccuda_CUdevice_attribute;

/* "cuda/ccuda.pxd":435
 * ctypedef CUdevice_attribute_enum CUdevice_attribute
 * 
 * cdef struct CUdevprop_st:             # <<<<<<<<<<<<<<
 *     int maxThreadsPerBlock
 *     int maxThreadsDim[3]
 */
struct __pyx_t_4cuda_5ccuda_CUdevprop_st {
  int maxThreadsPerBlock;
  int maxThreadsDim[3];
  int maxGridSize[3];
  int sharedMemPerBlock;
  int totalConstantMemory;
  int SIMDWidth;
  int memPitch;
  int regsPerBlock;
  int clockRate;
  int textureAlign;
};

/* "cuda/ccuda.pxd":447
 *     int textureAlign
 * 
 * ctypedef CUdevprop_st CUdevprop_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUdevprop_v1 CUdevprop
 */
typedef struct __pyx_t_4cuda_5ccuda_CUdevprop_st __pyx_t_4cuda_5ccuda_CUdevprop_v1;

/* "cuda/ccuda.pxd":449
 * ctypedef CUdevprop_st CUdevprop_v1
 * 
 * ctypedef CUdevprop_v1 CUdevprop             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUpointer_attribute_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUdevprop_v1 __pyx_t_4cuda_5ccuda_CUdevprop;

/* "cuda/ccuda.pxd":470
 *     CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17
 * 
 * ctypedef CUpointer_attribute_enum CUpointer_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUfunction_attribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUpointer_attribute_enum __pyx_t_4cuda_5ccuda_CUpointer_attribute;

/* "cuda/ccuda.pxd":485
 *     CU_FUNC_ATTRIBUTE_MAX = 10
 * 
 * ctypedef CUfunction_attribute_enum CUfunction_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUfunc_cache_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUfunction_attribute_enum __pyx_t_4cuda_5ccuda_CUfunction_attribute;

/* "cuda/ccuda.pxd":493
 *     CU_FUNC_CACHE_PREFER_EQUAL = 3
 * 
 * ctypedef CUfunc_cache_enum CUfunc_cache             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUsharedconfig_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUfunc_cache_enum __pyx_t_4cuda_5ccuda_CUfunc_cache;

/* "cuda/ccuda.pxd":500
 *     CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2
 * 
 * ctypedef CUsharedconfig_enum CUsharedconfig             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUshared_carveout_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUsharedconfig_enum __pyx_t_4cuda_5ccuda_CUsharedconfig;

/* "cuda/ccuda.pxd":507
 *     CU_SHAREDMEM_CARVEOUT_MAX_L1 = 0
 * 
 * ctypedef CUshared_carveout_enum CUshared_carveout             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemorytype_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUshared_carveout_enum __pyx_t_4cuda_5ccuda_CUshared_carveout;

/* "cuda/ccuda.pxd":515
 *     CU_MEMORYTYPE_UNIFIED = 4
 * 
 * ctypedef CUmemorytype_enum CUmemorytype             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUcomputemode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum __pyx_t_4cuda_5ccuda_CUmemorytype;

/* "cuda/ccuda.pxd":522
 *     CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3
 * 
 * ctypedef CUcomputemode_enum CUcomputemode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmem_advise_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUcomputemode_enum __pyx_t_4cuda_5ccuda_CUcomputemode;

/* "cuda/ccuda.pxd":532
 *     CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6
 * 
 * ctypedef CUmem_advise_enum CUmem_advise             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmem_range_attribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmem_advise_enum __pyx_t_4cuda_5ccuda_CUmem_advise;

/* "cuda/ccuda.pxd":540
 *     CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4
 * 
 * ctypedef CUmem_range_attribute_enum CUmem_range_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjit_option_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmem_range_attribute_enum __pyx_t_4cuda_5ccuda_CUmem_range_attribute;

/* "cuda/ccuda.pxd":570
 *     CU_JIT_NUM_OPTIONS = 25
 * 
 * ctypedef CUjit_option_enum CUjit_option             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjit_target_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjit_option_enum __pyx_t_4cuda_5ccuda_CUjit_option;

/* "cuda/ccuda.pxd":591
 *     CU_TARGET_COMPUTE_86 = 86
 * 
 * ctypedef CUjit_target_enum CUjit_target             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjit_fallback_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjit_target_enum __pyx_t_4cuda_5ccuda_CUjit_target;

/* "cuda/ccuda.pxd":597
 *     CU_PREFER_BINARY = 1
 * 
 * ctypedef CUjit_fallback_enum CUjit_fallback             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjit_cacheMode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjit_fallback_enum __pyx_t_4cuda_5ccuda_CUjit_fallback;

/* "cuda/ccuda.pxd":604
 *     CU_JIT_CACHE_OPTION_CA = 2
 * 
 * ctypedef CUjit_cacheMode_enum CUjit_cacheMode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjitInputType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjit_cacheMode_enum __pyx_t_4cuda_5ccuda_CUjit_cacheMode;

/* "cuda/ccuda.pxd":615
 *     CU_JIT_NUM_INPUT_TYPES = 6
 * 
 * ctypedef CUjitInputType_enum CUjitInputType             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjitInputType_enum __pyx_t_4cuda_5ccuda_CUjitInputType;

/* "cuda/ccuda.pxd":620
 *     cdef struct CUlinkState_st:
 *         pass
 * ctypedef CUlinkState_st* CUlinkState             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphicsRegisterFlags_enum:
 */
typedef struct CUlinkState_st *__pyx_t_4cuda_5ccuda_CUlinkState;

/* "cuda/ccuda.pxd":629
 *     CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8
 * 
 * ctypedef CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphicsMapResourceFlags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags_enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags;

/* "cuda/ccuda.pxd":636
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
 * 
 * ctypedef CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUarray_cubemap_face_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphicsMapResourceFlags_enum __pyx_t_4cuda_5ccuda_CUgraphicsMapResourceFlags;

/* "cuda/ccuda.pxd":646
 *     CU_CUBEMAP_FACE_NEGATIVE_Z = 5
 * 
 * ctypedef CUarray_cubemap_face_enum CUarray_cubemap_face             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUlimit_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUarray_cubemap_face_enum __pyx_t_4cuda_5ccuda_CUarray_cubemap_face;

/* "cuda/ccuda.pxd":658
 *     CU_LIMIT_MAX = 7
 * 
 * ctypedef CUlimit_enum CUlimit             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUresourcetype_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUlimit_enum __pyx_t_4cuda_5ccuda_CUlimit;

/* "cuda/ccuda.pxd":666
 *     CU_RESOURCE_TYPE_PITCH2D = 3
 * 
 * ctypedef CUresourcetype_enum CUresourcetype             # <<<<<<<<<<<<<<
 * 
 * ctypedef void (*CUhostFn)(void* userData)
 */
typedef enum __pyx_t_4cuda_5ccuda_CUresourcetype_enum __pyx_t_4cuda_5ccuda_CUresourcetype;

/* "cuda/ccuda.pxd":668
 * ctypedef CUresourcetype_enum CUresourcetype
 * 
 * ctypedef void (*CUhostFn)(void* userData)             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUaccessProperty_enum:
 */
typedef void (*__pyx_t_4cuda_5ccuda_CUhostFn)(void *);

/* "cuda/ccuda.pxd":675
 *     CU_ACCESS_PROPERTY_PERSISTING = 2
 * 
 * ctypedef CUaccessProperty_enum CUaccessProperty             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUaccessPolicyWindow_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUaccessProperty_enum __pyx_t_4cuda_5ccuda_CUaccessProperty;

/* "cuda/ccuda.pxd":677
 * ctypedef CUaccessProperty_enum CUaccessProperty
 * 
 * cdef struct CUaccessPolicyWindow_st:             # <<<<<<<<<<<<<<
 *     void* base_ptr
 *     size_t num_bytes
 */
struct __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_st {
  void *base_ptr;
  size_t num_bytes;
  float hitRatio;
  __pyx_t_4cuda_5ccuda_CUaccessProperty hitProp;
  __pyx_t_4cuda_5ccuda_CUaccessProperty missProp;
};

/* "cuda/ccuda.pxd":684
 *     CUaccessProperty missProp
 * 
 * ctypedef CUaccessPolicyWindow_st CUaccessPolicyWindow_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUaccessPolicyWindow_v1 CUaccessPolicyWindow
 */
typedef struct __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_st __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_v1;

/* "cuda/ccuda.pxd":686
 * ctypedef CUaccessPolicyWindow_st CUaccessPolicyWindow_v1
 * 
 * ctypedef CUaccessPolicyWindow_v1 CUaccessPolicyWindow             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_KERNEL_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_v1 __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow;

/* "cuda/ccuda.pxd":688
 * ctypedef CUaccessPolicyWindow_v1 CUaccessPolicyWindow
 * 
 * cdef struct CUDA_KERNEL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUfunction func
 *     unsigned int gridDimX
 */
struct __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUfunction func;
  unsigned int gridDimX;
  unsigned int gridDimY;
  unsigned int gridDimZ;
  unsigned int blockDimX;
  unsigned int blockDimY;
  unsigned int blockDimZ;
  unsigned int sharedMemBytes;
  void **kernelParams;
  void **extra;
};

/* "cuda/ccuda.pxd":700
 *     void** extra
 * 
 * ctypedef CUDA_KERNEL_NODE_PARAMS_st CUDA_KERNEL_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_KERNEL_NODE_PARAMS_v1 CUDA_KERNEL_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":702
 * ctypedef CUDA_KERNEL_NODE_PARAMS_st CUDA_KERNEL_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_KERNEL_NODE_PARAMS_v1 CUDA_KERNEL_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEMSET_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS;

/* "cuda/ccuda.pxd":704
 * ctypedef CUDA_KERNEL_NODE_PARAMS_v1 CUDA_KERNEL_NODE_PARAMS
 * 
 * cdef struct CUDA_MEMSET_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUdeviceptr dst
 *     size_t pitch
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUdeviceptr dst;
  size_t pitch;
  unsigned int value;
  unsigned int elementSize;
  size_t width;
  size_t height;
};

/* "cuda/ccuda.pxd":712
 *     size_t height
 * 
 * ctypedef CUDA_MEMSET_NODE_PARAMS_st CUDA_MEMSET_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_MEMSET_NODE_PARAMS_v1 CUDA_MEMSET_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":714
 * ctypedef CUDA_MEMSET_NODE_PARAMS_st CUDA_MEMSET_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_MEMSET_NODE_PARAMS_v1 CUDA_MEMSET_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_HOST_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS;

/* "cuda/ccuda.pxd":716
 * ctypedef CUDA_MEMSET_NODE_PARAMS_v1 CUDA_MEMSET_NODE_PARAMS
 * 
 * cdef struct CUDA_HOST_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUhostFn fn
 *     void* userData
 */
struct __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUhostFn fn;
  void *userData;
};

/* "cuda/ccuda.pxd":720
 *     void* userData
 * 
 * ctypedef CUDA_HOST_NODE_PARAMS_st CUDA_HOST_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_HOST_NODE_PARAMS_v1 CUDA_HOST_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":722
 * ctypedef CUDA_HOST_NODE_PARAMS_st CUDA_HOST_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_HOST_NODE_PARAMS_v1 CUDA_HOST_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphNodeType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS;

/* "cuda/ccuda.pxd":738
 *     CU_GRAPH_NODE_TYPE_MEM_FREE = 11
 * 
 * ctypedef CUgraphNodeType_enum CUgraphNodeType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUsynchronizationPolicy_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphNodeType_enum __pyx_t_4cuda_5ccuda_CUgraphNodeType;

/* "cuda/ccuda.pxd":746
 *     CU_SYNC_POLICY_BLOCKING_SYNC = 4
 * 
 * ctypedef CUsynchronizationPolicy_enum CUsynchronizationPolicy             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUkernelNodeAttrID_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUsynchronizationPolicy_enum __pyx_t_4cuda_5ccuda_CUsynchronizationPolicy;

/* "cuda/ccuda.pxd":752
 *     CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
 * 
 * ctypedef CUkernelNodeAttrID_enum CUkernelNodeAttrID             # <<<<<<<<<<<<<<
 * 
 * cdef union CUkernelNodeAttrValue_union:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID_enum __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID;

/* "cuda/ccuda.pxd":754
 * ctypedef CUkernelNodeAttrID_enum CUkernelNodeAttrID
 * 
 * cdef union CUkernelNodeAttrValue_union:             # <<<<<<<<<<<<<<
 *     CUaccessPolicyWindow accessPolicyWindow
 *     int cooperative
 */
union __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_union {
  __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow accessPolicyWindow;
  int cooperative;
};

/* "cuda/ccuda.pxd":758
 *     int cooperative
 * 
 * ctypedef CUkernelNodeAttrValue_union CUkernelNodeAttrValue_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUkernelNodeAttrValue_v1 CUkernelNodeAttrValue
 */
typedef union __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_union __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_v1;

/* "cuda/ccuda.pxd":760
 * ctypedef CUkernelNodeAttrValue_union CUkernelNodeAttrValue_v1
 * 
 * ctypedef CUkernelNodeAttrValue_v1 CUkernelNodeAttrValue             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamCaptureStatus_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_v1 __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue;

/* "cuda/ccuda.pxd":767
 *     CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2
 * 
 * ctypedef CUstreamCaptureStatus_enum CUstreamCaptureStatus             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamCaptureMode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus_enum __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus;

/* "cuda/ccuda.pxd":774
 *     CU_STREAM_CAPTURE_MODE_RELAXED = 2
 * 
 * ctypedef CUstreamCaptureMode_enum CUstreamCaptureMode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamAttrID_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamCaptureMode_enum __pyx_t_4cuda_5ccuda_CUstreamCaptureMode;

/* "cuda/ccuda.pxd":780
 *     CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 * 
 * ctypedef CUstreamAttrID_enum CUstreamAttrID             # <<<<<<<<<<<<<<
 * 
 * cdef union CUstreamAttrValue_union:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamAttrID_enum __pyx_t_4cuda_5ccuda_CUstreamAttrID;

/* "cuda/ccuda.pxd":782
 * ctypedef CUstreamAttrID_enum CUstreamAttrID
 * 
 * cdef union CUstreamAttrValue_union:             # <<<<<<<<<<<<<<
 *     CUaccessPolicyWindow accessPolicyWindow
 *     CUsynchronizationPolicy syncPolicy
 */
union __pyx_t_4cuda_5ccuda_CUstreamAttrValue_union {
  __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow accessPolicyWindow;
  __pyx_t_4cuda_5ccuda_CUsynchronizationPolicy syncPolicy;
};

/* "cuda/ccuda.pxd":786
 *     CUsynchronizationPolicy syncPolicy
 * 
 * ctypedef CUstreamAttrValue_union CUstreamAttrValue_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUstreamAttrValue_v1 CUstreamAttrValue
 */
typedef union __pyx_t_4cuda_5ccuda_CUstreamAttrValue_union __pyx_t_4cuda_5ccuda_CUstreamAttrValue_v1;

/* "cuda/ccuda.pxd":788
 * ctypedef CUstreamAttrValue_union CUstreamAttrValue_v1
 * 
 * ctypedef CUstreamAttrValue_v1 CUstreamAttrValue             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUdriverProcAddress_flags_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUstreamAttrValue_v1 __pyx_t_4cuda_5ccuda_CUstreamAttrValue;

/* "cuda/ccuda.pxd":795
 *     CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = 2
 * 
 * ctypedef CUdriverProcAddress_flags_enum CUdriverProcAddress_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUexecAffinityType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUdriverProcAddress_flags_enum __pyx_t_4cuda_5ccuda_CUdriverProcAddress_flags;

/* "cuda/ccuda.pxd":801
 *     CU_EXEC_AFFINITY_TYPE_MAX = 1
 * 
 * ctypedef CUexecAffinityType_enum CUexecAffinityType             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUexecAffinitySmCount_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUexecAffinityType_enum __pyx_t_4cuda_5ccuda_CUexecAffinityType;

/* "cuda/ccuda.pxd":803
 * ctypedef CUexecAffinityType_enum CUexecAffinityType
 * 
 * cdef struct CUexecAffinitySmCount_st:             # <<<<<<<<<<<<<<
 *     unsigned int val
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_st {
  unsigned int val;
};

/* "cuda/ccuda.pxd":806
 *     unsigned int val
 * 
 * ctypedef CUexecAffinitySmCount_st CUexecAffinitySmCount_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUexecAffinitySmCount_v1 CUexecAffinitySmCount
 */
typedef struct __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_st __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_v1;

/* "cuda/ccuda.pxd":808
 * ctypedef CUexecAffinitySmCount_st CUexecAffinitySmCount_v1
 * 
 * ctypedef CUexecAffinitySmCount_v1 CUexecAffinitySmCount             # <<<<<<<<<<<<<<
 * 
 * cdef union _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u:
 */
typedef __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_v1 __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount;

/* "cuda/ccuda.pxd":810
 * ctypedef CUexecAffinitySmCount_v1 CUexecAffinitySmCount
 * 
 * cdef union _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u:             # <<<<<<<<<<<<<<
 *     CUexecAffinitySmCount smCount
 * 
 */
union __pyx_t_4cuda_5ccuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u {
  __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount smCount;
};

/* "cuda/ccuda.pxd":813
 *     CUexecAffinitySmCount smCount
 * 
 * cdef struct CUexecAffinityParam_st:             # <<<<<<<<<<<<<<
 *     CUexecAffinityType type
 *     _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u param
 */
struct __pyx_t_4cuda_5ccuda_CUexecAffinityParam_st {
  __pyx_t_4cuda_5ccuda_CUexecAffinityType type;
  union __pyx_t_4cuda_5ccuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u param;
};

/* "cuda/ccuda.pxd":817
 *     _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u param
 * 
 * ctypedef CUexecAffinityParam_st CUexecAffinityParam_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUexecAffinityParam_v1 CUexecAffinityParam
 */
typedef struct __pyx_t_4cuda_5ccuda_CUexecAffinityParam_st __pyx_t_4cuda_5ccuda_CUexecAffinityParam_v1;

/* "cuda/ccuda.pxd":819
 * ctypedef CUexecAffinityParam_st CUexecAffinityParam_v1
 * 
 * ctypedef CUexecAffinityParam_v1 CUexecAffinityParam             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaError_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUexecAffinityParam_v1 __pyx_t_4cuda_5ccuda_CUexecAffinityParam;

/* "cuda/ccuda.pxd":910
 *     CUDA_ERROR_UNKNOWN = 999
 * 
 * ctypedef cudaError_enum CUresult             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUdevice_P2PAttribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_cudaError_enum __pyx_t_4cuda_5ccuda_CUresult;

/* "cuda/ccuda.pxd":919
 *     CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 4
 * 
 * ctypedef CUdevice_P2PAttribute_enum CUdevice_P2PAttribute             # <<<<<<<<<<<<<<
 * 
 * ctypedef void (*CUstreamCallback)(CUstream hStream, CUresult status, void* userData)
 */
typedef enum __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute_enum __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute;

/* "cuda/ccuda.pxd":921
 * ctypedef CUdevice_P2PAttribute_enum CUdevice_P2PAttribute
 * 
 * ctypedef void (*CUstreamCallback)(CUstream hStream, CUresult status, void* userData)             # <<<<<<<<<<<<<<
 * 
 * ctypedef size_t (*CUoccupancyB2DSize)(int blockSize)
 */
typedef void (*__pyx_t_4cuda_5ccuda_CUstreamCallback)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUresult, void *);

/* "cuda/ccuda.pxd":923
 * ctypedef void (*CUstreamCallback)(CUstream hStream, CUresult status, void* userData)
 * 
 * ctypedef size_t (*CUoccupancyB2DSize)(int blockSize)             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEMCPY2D_st:
 */
typedef size_t (*__pyx_t_4cuda_5ccuda_CUoccupancyB2DSize)(int);

/* "cuda/ccuda.pxd":925
 * ctypedef size_t (*CUoccupancyB2DSize)(int blockSize)
 * 
 * cdef struct CUDA_MEMCPY2D_st:             # <<<<<<<<<<<<<<
 *     size_t srcXInBytes
 *     size_t srcY
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_st {
  size_t srcXInBytes;
  size_t srcY;
  __pyx_t_4cuda_5ccuda_CUmemorytype srcMemoryType;
  void const *srcHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr srcDevice;
  __pyx_t_4cuda_5ccuda_CUarray srcArray;
  size_t srcPitch;
  size_t dstXInBytes;
  size_t dstY;
  __pyx_t_4cuda_5ccuda_CUmemorytype dstMemoryType;
  void *dstHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr dstDevice;
  __pyx_t_4cuda_5ccuda_CUarray dstArray;
  size_t dstPitch;
  size_t WidthInBytes;
  size_t Height;
};

/* "cuda/ccuda.pxd":943
 *     size_t Height
 * 
 * ctypedef CUDA_MEMCPY2D_st CUDA_MEMCPY2D_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_st __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2;

/* "cuda/ccuda.pxd":945
 * ctypedef CUDA_MEMCPY2D_st CUDA_MEMCPY2D_v2
 * 
 * ctypedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEMCPY3D_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2 __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D;

/* "cuda/ccuda.pxd":947
 * ctypedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D
 * 
 * cdef struct CUDA_MEMCPY3D_st:             # <<<<<<<<<<<<<<
 *     size_t srcXInBytes
 *     size_t srcY
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_st {
  size_t srcXInBytes;
  size_t srcY;
  size_t srcZ;
  size_t srcLOD;
  __pyx_t_4cuda_5ccuda_CUmemorytype srcMemoryType;
  void const *srcHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr srcDevice;
  __pyx_t_4cuda_5ccuda_CUarray srcArray;
  void *reserved0;
  size_t srcPitch;
  size_t srcHeight;
  size_t dstXInBytes;
  size_t dstY;
  size_t dstZ;
  size_t dstLOD;
  __pyx_t_4cuda_5ccuda_CUmemorytype dstMemoryType;
  void *dstHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr dstDevice;
  __pyx_t_4cuda_5ccuda_CUarray dstArray;
  void *reserved1;
  size_t dstPitch;
  size_t dstHeight;
  size_t WidthInBytes;
  size_t Height;
  size_t Depth;
};

/* "cuda/ccuda.pxd":974
 *     size_t Depth
 * 
 * ctypedef CUDA_MEMCPY3D_st CUDA_MEMCPY3D_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_MEMCPY3D_v2 CUDA_MEMCPY3D
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_st __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2;

/* "cuda/ccuda.pxd":976
 * ctypedef CUDA_MEMCPY3D_st CUDA_MEMCPY3D_v2
 * 
 * ctypedef CUDA_MEMCPY3D_v2 CUDA_MEMCPY3D             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEMCPY3D_PEER_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D;

/* "cuda/ccuda.pxd":978
 * ctypedef CUDA_MEMCPY3D_v2 CUDA_MEMCPY3D
 * 
 * cdef struct CUDA_MEMCPY3D_PEER_st:             # <<<<<<<<<<<<<<
 *     size_t srcXInBytes
 *     size_t srcY
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_st {
  size_t srcXInBytes;
  size_t srcY;
  size_t srcZ;
  size_t srcLOD;
  __pyx_t_4cuda_5ccuda_CUmemorytype srcMemoryType;
  void const *srcHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr srcDevice;
  __pyx_t_4cuda_5ccuda_CUarray srcArray;
  __pyx_t_4cuda_5ccuda_CUcontext srcContext;
  size_t srcPitch;
  size_t srcHeight;
  size_t dstXInBytes;
  size_t dstY;
  size_t dstZ;
  size_t dstLOD;
  __pyx_t_4cuda_5ccuda_CUmemorytype dstMemoryType;
  void *dstHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr dstDevice;
  __pyx_t_4cuda_5ccuda_CUarray dstArray;
  __pyx_t_4cuda_5ccuda_CUcontext dstContext;
  size_t dstPitch;
  size_t dstHeight;
  size_t WidthInBytes;
  size_t Height;
  size_t Depth;
};

/* "cuda/ccuda.pxd":1005
 *     size_t Depth
 * 
 * ctypedef CUDA_MEMCPY3D_PEER_st CUDA_MEMCPY3D_PEER_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_st __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_v1;

/* "cuda/ccuda.pxd":1007
 * ctypedef CUDA_MEMCPY3D_PEER_st CUDA_MEMCPY3D_PEER_v1
 * 
 * ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_ARRAY_DESCRIPTOR_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_v1 __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER;

/* "cuda/ccuda.pxd":1009
 * ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER
 * 
 * cdef struct CUDA_ARRAY_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *     size_t Width
 *     size_t Height
 */
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_st {
  size_t Width;
  size_t Height;
  __pyx_t_4cuda_5ccuda_CUarray_format Format;
  unsigned int NumChannels;
};

/* "cuda/ccuda.pxd":1015
 *     unsigned int NumChannels
 * 
 * ctypedef CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_ARRAY_DESCRIPTOR_v2 CUDA_ARRAY_DESCRIPTOR
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_st __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_v2;

/* "cuda/ccuda.pxd":1017
 * ctypedef CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR_v2
 * 
 * ctypedef CUDA_ARRAY_DESCRIPTOR_v2 CUDA_ARRAY_DESCRIPTOR             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_ARRAY3D_DESCRIPTOR_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_v2 __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR;

/* "cuda/ccuda.pxd":1019
 * ctypedef CUDA_ARRAY_DESCRIPTOR_v2 CUDA_ARRAY_DESCRIPTOR
 * 
 * cdef struct CUDA_ARRAY3D_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *     size_t Width
 *     size_t Height
 */
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_st {
  size_t Width;
  size_t Height;
  size_t Depth;
  __pyx_t_4cuda_5ccuda_CUarray_format Format;
  unsigned int NumChannels;
  unsigned int Flags;
};

/* "cuda/ccuda.pxd":1027
 *     unsigned int Flags
 * 
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_st __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2;

/* "cuda/ccuda.pxd":1029
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR_v2
 * 
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR;

/* "cuda/ccuda.pxd":1031
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR
 * 
 * cdef struct _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s:             # <<<<<<<<<<<<<<
 *     unsigned int width
 *     unsigned int height
 */
struct __pyx_t_4cuda_5ccuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s {
  unsigned int width;
  unsigned int height;
  unsigned int depth;
};

/* "cuda/ccuda.pxd":1036
 *     unsigned int depth
 * 
 * cdef struct CUDA_ARRAY_SPARSE_PROPERTIES_st:             # <<<<<<<<<<<<<<
 *     _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s tileExtent
 *     unsigned int miptailFirstLevel
 */
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_st {
  struct __pyx_t_4cuda_5ccuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s tileExtent;
  unsigned int miptailFirstLevel;
  unsigned PY_LONG_LONG miptailSize;
  unsigned int flags;
  unsigned int reserved[4];
};

/* "cuda/ccuda.pxd":1043
 *     unsigned int reserved[4]
 * 
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_st CUDA_ARRAY_SPARSE_PROPERTIES_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_st __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1;

/* "cuda/ccuda.pxd":1045
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_st CUDA_ARRAY_SPARSE_PROPERTIES_v1
 * 
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1 __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES;

/* "cuda/ccuda.pxd":1047
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES
 * 
 * cdef struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st:             # <<<<<<<<<<<<<<
 *     size_t size
 *     size_t alignment
 */
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st {
  size_t size;
  size_t alignment;
  unsigned int reserved[4];
};

/* "cuda/ccuda.pxd":1052
 *     unsigned int reserved[4]
 * 
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_st CUDA_ARRAY_MEMORY_REQUIREMENTS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1;

/* "cuda/ccuda.pxd":1054
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_st CUDA_ARRAY_MEMORY_REQUIREMENTS_v1
 * 
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS;

/* "cuda/ccuda.pxd":1056
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s:             # <<<<<<<<<<<<<<
 *     CUarray hArray
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s {
  __pyx_t_4cuda_5ccuda_CUarray hArray;
};

/* "cuda/ccuda.pxd":1059
 *     CUarray hArray
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s:             # <<<<<<<<<<<<<<
 *     CUmipmappedArray hMipmappedArray
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s {
  __pyx_t_4cuda_5ccuda_CUmipmappedArray hMipmappedArray;
};

/* "cuda/ccuda.pxd":1062
 *     CUmipmappedArray hMipmappedArray
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s:             # <<<<<<<<<<<<<<
 *     CUdeviceptr devPtr
 *     CUarray_format format
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s {
  __pyx_t_4cuda_5ccuda_CUdeviceptr devPtr;
  __pyx_t_4cuda_5ccuda_CUarray_format format;
  unsigned int numChannels;
  size_t sizeInBytes;
};

/* "cuda/ccuda.pxd":1068
 *     size_t sizeInBytes
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s:             # <<<<<<<<<<<<<<
 *     CUdeviceptr devPtr
 *     CUarray_format format
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s {
  __pyx_t_4cuda_5ccuda_CUdeviceptr devPtr;
  __pyx_t_4cuda_5ccuda_CUarray_format format;
  unsigned int numChannels;
  size_t width;
  size_t height;
  size_t pitchInBytes;
};

/* "cuda/ccuda.pxd":1076
 *     size_t pitchInBytes
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s:             # <<<<<<<<<<<<<<
 *     int reserved[32]
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s {
  int reserved[32];
};

/* "cuda/ccuda.pxd":1079
 *     int reserved[32]
 * 
 * cdef union _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u:             # <<<<<<<<<<<<<<
 *     _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s array
 *     _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s mipmap
 */
union __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u {
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s array;
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s mipmap;
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s linear;
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s pitch2D;
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s reserved;
};

/* "cuda/ccuda.pxd":1086
 *     _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s reserved
 * 
 * cdef struct CUDA_RESOURCE_DESC_st:             # <<<<<<<<<<<<<<
 *     CUresourcetype resType
 *     _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u res
 */
struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_st {
  __pyx_t_4cuda_5ccuda_CUresourcetype resType;
  union __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u res;
  unsigned int flags;
};

/* "cuda/ccuda.pxd":1091
 *     unsigned int flags
 * 
 * ctypedef CUDA_RESOURCE_DESC_st CUDA_RESOURCE_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_RESOURCE_DESC_v1 CUDA_RESOURCE_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_st __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_v1;

/* "cuda/ccuda.pxd":1093
 * ctypedef CUDA_RESOURCE_DESC_st CUDA_RESOURCE_DESC_v1
 * 
 * ctypedef CUDA_RESOURCE_DESC_v1 CUDA_RESOURCE_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_TEXTURE_DESC_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC;

/* "cuda/ccuda.pxd":1095
 * ctypedef CUDA_RESOURCE_DESC_v1 CUDA_RESOURCE_DESC
 * 
 * cdef struct CUDA_TEXTURE_DESC_st:             # <<<<<<<<<<<<<<
 *     CUaddress_mode addressMode[3]
 *     CUfilter_mode filterMode
 */
struct __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_st {
  __pyx_t_4cuda_5ccuda_CUaddress_mode addressMode[3];
  __pyx_t_4cuda_5ccuda_CUfilter_mode filterMode;
  unsigned int flags;
  unsigned int maxAnisotropy;
  __pyx_t_4cuda_5ccuda_CUfilter_mode mipmapFilterMode;
  float mipmapLevelBias;
  float minMipmapLevelClamp;
  float maxMipmapLevelClamp;
  float borderColor[4];
  int reserved[12];
};

/* "cuda/ccuda.pxd":1107
 *     int reserved[12]
 * 
 * ctypedef CUDA_TEXTURE_DESC_st CUDA_TEXTURE_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_st __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_v1;

/* "cuda/ccuda.pxd":1109
 * ctypedef CUDA_TEXTURE_DESC_st CUDA_TEXTURE_DESC_v1
 * 
 * ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUresourceViewFormat_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC;

/* "cuda/ccuda.pxd":1148
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34
 * 
 * ctypedef CUresourceViewFormat_enum CUresourceViewFormat             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_RESOURCE_VIEW_DESC_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUresourceViewFormat_enum __pyx_t_4cuda_5ccuda_CUresourceViewFormat;

/* "cuda/ccuda.pxd":1150
 * ctypedef CUresourceViewFormat_enum CUresourceViewFormat
 * 
 * cdef struct CUDA_RESOURCE_VIEW_DESC_st:             # <<<<<<<<<<<<<<
 *     CUresourceViewFormat format
 *     size_t width
 */
struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_st {
  __pyx_t_4cuda_5ccuda_CUresourceViewFormat format;
  size_t width;
  size_t height;
  size_t depth;
  unsigned int firstMipmapLevel;
  unsigned int lastMipmapLevel;
  unsigned int firstLayer;
  unsigned int lastLayer;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1161
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_RESOURCE_VIEW_DESC_st CUDA_RESOURCE_VIEW_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_RESOURCE_VIEW_DESC_v1 CUDA_RESOURCE_VIEW_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_st __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_v1;

/* "cuda/ccuda.pxd":1163
 * ctypedef CUDA_RESOURCE_VIEW_DESC_st CUDA_RESOURCE_VIEW_DESC_v1
 * 
 * ctypedef CUDA_RESOURCE_VIEW_DESC_v1 CUDA_RESOURCE_VIEW_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC;

/* "cuda/ccuda.pxd":1165
 * ctypedef CUDA_RESOURCE_VIEW_DESC_v1 CUDA_RESOURCE_VIEW_DESC
 * 
 * cdef struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:             # <<<<<<<<<<<<<<
 *     unsigned long long p2pToken
 *     unsigned int vaSpaceToken
 */
struct __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st {
  unsigned PY_LONG_LONG p2pToken;
  unsigned int vaSpaceToken;
};

/* "cuda/ccuda.pxd":1169
 *     unsigned int vaSpaceToken
 * 
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 CUDA_POINTER_ATTRIBUTE_P2P_TOKENS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1;

/* "cuda/ccuda.pxd":1171
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1
 * 
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 CUDA_POINTER_ATTRIBUTE_P2P_TOKENS             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS;

/* "cuda/ccuda.pxd":1178
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = 3
 * 
 * ctypedef CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_LAUNCH_PARAMS_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS;

/* "cuda/ccuda.pxd":1180
 * ctypedef CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS
 * 
 * cdef struct CUDA_LAUNCH_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUfunction function
 *     unsigned int gridDimX
 */
struct __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUfunction function;
  unsigned int gridDimX;
  unsigned int gridDimY;
  unsigned int gridDimZ;
  unsigned int blockDimX;
  unsigned int blockDimY;
  unsigned int blockDimZ;
  unsigned int sharedMemBytes;
  __pyx_t_4cuda_5ccuda_CUstream hStream;
  void **kernelParams;
};

/* "cuda/ccuda.pxd":1192
 *     void** kernelParams
 * 
 * ctypedef CUDA_LAUNCH_PARAMS_st CUDA_LAUNCH_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_LAUNCH_PARAMS_v1 CUDA_LAUNCH_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_v1;

/* "cuda/ccuda.pxd":1194
 * ctypedef CUDA_LAUNCH_PARAMS_st CUDA_LAUNCH_PARAMS_v1
 * 
 * ctypedef CUDA_LAUNCH_PARAMS_v1 CUDA_LAUNCH_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUexternalMemoryHandleType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS;

/* "cuda/ccuda.pxd":1206
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8
 * 
 * ctypedef CUexternalMemoryHandleType_enum CUexternalMemoryHandleType             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUexternalMemoryHandleType_enum __pyx_t_4cuda_5ccuda_CUexternalMemoryHandleType;

/* "cuda/ccuda.pxd":1208
 * ctypedef CUexternalMemoryHandleType_enum CUexternalMemoryHandleType
 * 
 * cdef struct _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s:             # <<<<<<<<<<<<<<
 *     void* handle
 *     void* name
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s {
  void *handle;
  void *name;
};

/* "cuda/ccuda.pxd":1212
 *     void* name
 * 
 * cdef union _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u:             # <<<<<<<<<<<<<<
 *     int fd
 *     _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s win32
 */
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u {
  int fd;
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s win32;
  void *nvSciBufObject;
};

/* "cuda/ccuda.pxd":1217
 *     void* nvSciBufObject
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *     CUexternalMemoryHandleType type
 *     _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u handle
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st {
  __pyx_t_4cuda_5ccuda_CUexternalMemoryHandleType type;
  union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u handle;
  unsigned PY_LONG_LONG size;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1224
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 CUDA_EXTERNAL_MEMORY_HANDLE_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1;

/* "cuda/ccuda.pxd":1226
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 CUDA_EXTERNAL_MEMORY_HANDLE_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC;

/* "cuda/ccuda.pxd":1228
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 CUDA_EXTERNAL_MEMORY_HANDLE_DESC
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:             # <<<<<<<<<<<<<<
 *     unsigned long long offset
 *     unsigned long long size
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st {
  unsigned PY_LONG_LONG offset;
  unsigned PY_LONG_LONG size;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1234
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 CUDA_EXTERNAL_MEMORY_BUFFER_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1;

/* "cuda/ccuda.pxd":1236
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 CUDA_EXTERNAL_MEMORY_BUFFER_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC;

/* "cuda/ccuda.pxd":1238
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 CUDA_EXTERNAL_MEMORY_BUFFER_DESC
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:             # <<<<<<<<<<<<<<
 *     unsigned long long offset
 *     CUDA_ARRAY3D_DESCRIPTOR arrayDesc
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st {
  unsigned PY_LONG_LONG offset;
  __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR arrayDesc;
  unsigned int numLevels;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1244
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1;

/* "cuda/ccuda.pxd":1246
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUexternalSemaphoreHandleType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC;

/* "cuda/ccuda.pxd":1260
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = 10
 * 
 * ctypedef CUexternalSemaphoreHandleType_enum CUexternalSemaphoreHandleType             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUexternalSemaphoreHandleType_enum __pyx_t_4cuda_5ccuda_CUexternalSemaphoreHandleType;

/* "cuda/ccuda.pxd":1262
 * ctypedef CUexternalSemaphoreHandleType_enum CUexternalSemaphoreHandleType
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s:             # <<<<<<<<<<<<<<
 *     void* handle
 *     void* name
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s {
  void *handle;
  void *name;
};

/* "cuda/ccuda.pxd":1266
 *     void* name
 * 
 * cdef union _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u:             # <<<<<<<<<<<<<<
 *     int fd
 *     _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s win32
 */
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u {
  int fd;
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s win32;
  void *nvSciSyncObj;
};

/* "cuda/ccuda.pxd":1271
 *     void* nvSciSyncObj
 * 
 * cdef struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *     CUexternalSemaphoreHandleType type
 *     _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u handle
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st {
  __pyx_t_4cuda_5ccuda_CUexternalSemaphoreHandleType type;
  union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u handle;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1277
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1;

/* "cuda/ccuda.pxd":1279
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC;

/* "cuda/ccuda.pxd":1281
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s:             # <<<<<<<<<<<<<<
 *     unsigned long long value
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s {
  unsigned PY_LONG_LONG value;
};

/* "cuda/ccuda.pxd":1284
 *     unsigned long long value
 * 
 * cdef union _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u:             # <<<<<<<<<<<<<<
 *     void* fence
 *     unsigned long long reserved
 */
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u {
  void *fence;
  unsigned PY_LONG_LONG reserved;
};

/* "cuda/ccuda.pxd":1288
 *     unsigned long long reserved
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s:             # <<<<<<<<<<<<<<
 *     unsigned long long key
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s {
  unsigned PY_LONG_LONG key;
};

/* "cuda/ccuda.pxd":1291
 *     unsigned long long key
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s:             # <<<<<<<<<<<<<<
 *     _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s fence
 *     _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u nvSciSync
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s {
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s fence;
  union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u nvSciSync;
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s keyedMutex;
  unsigned int reserved[12];
};

/* "cuda/ccuda.pxd":1297
 *     unsigned int reserved[12]
 * 
 * cdef struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:             # <<<<<<<<<<<<<<
 *     _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s params
 *     unsigned int flags
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st {
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s params;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1302
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1;

/* "cuda/ccuda.pxd":1304
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS;

/* "cuda/ccuda.pxd":1306
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s:             # <<<<<<<<<<<<<<
 *     unsigned long long value
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s {
  unsigned PY_LONG_LONG value;
};

/* "cuda/ccuda.pxd":1309
 *     unsigned long long value
 * 
 * cdef union _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u:             # <<<<<<<<<<<<<<
 *     void* fence
 *     unsigned long long reserved
 */
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u {
  void *fence;
  unsigned PY_LONG_LONG reserved;
};

/* "cuda/ccuda.pxd":1313
 *     unsigned long long reserved
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s:             # <<<<<<<<<<<<<<
 *     unsigned long long key
 *     unsigned int timeoutMs
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s {
  unsigned PY_LONG_LONG key;
  unsigned int timeoutMs;
};

/* "cuda/ccuda.pxd":1317
 *     unsigned int timeoutMs
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s:             # <<<<<<<<<<<<<<
 *     _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s fence
 *     _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u nvSciSync
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s {
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s fence;
  union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u nvSciSync;
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s keyedMutex;
  unsigned int reserved[10];
};

/* "cuda/ccuda.pxd":1323
 *     unsigned int reserved[10]
 * 
 * cdef struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:             # <<<<<<<<<<<<<<
 *     _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s params
 *     unsigned int flags
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st {
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s params;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1328
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1;

/* "cuda/ccuda.pxd":1330
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS;

/* "cuda/ccuda.pxd":1332
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS
 * 
 * cdef struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUexternalSemaphore* extSemArray
 *     const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUexternalSemaphore *extSemArray;
  __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *paramsArray;
  unsigned int numExtSems;
};

/* "cuda/ccuda.pxd":1337
 *     unsigned int numExtSems
 * 
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 CUDA_EXT_SEM_SIGNAL_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":1339
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 CUDA_EXT_SEM_SIGNAL_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS;

/* "cuda/ccuda.pxd":1341
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 CUDA_EXT_SEM_SIGNAL_NODE_PARAMS
 * 
 * cdef struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUexternalSemaphore* extSemArray
 *     const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUexternalSemaphore *extSemArray;
  __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *paramsArray;
  unsigned int numExtSems;
};

/* "cuda/ccuda.pxd":1346
 *     unsigned int numExtSems
 * 
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":1348
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long CUmemGenericAllocationHandle_v1
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS;

/* "cuda/ccuda.pxd":1361
 *     CU_MEM_HANDLE_TYPE_MAX = 2147483647
 * 
 * ctypedef CUmemAllocationHandleType_enum CUmemAllocationHandleType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAccess_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType_enum __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType;

/* "cuda/ccuda.pxd":1369
 *     CU_MEM_ACCESS_FLAGS_PROT_MAX = 2147483647
 * 
 * ctypedef CUmemAccess_flags_enum CUmemAccess_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemLocationType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAccess_flags_enum __pyx_t_4cuda_5ccuda_CUmemAccess_flags;

/* "cuda/ccuda.pxd":1376
 *     CU_MEM_LOCATION_TYPE_MAX = 2147483647
 * 
 * ctypedef CUmemLocationType_enum CUmemLocationType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemLocationType_enum __pyx_t_4cuda_5ccuda_CUmemLocationType;

/* "cuda/ccuda.pxd":1383
 *     CU_MEM_ALLOCATION_TYPE_MAX = 2147483647
 * 
 * ctypedef CUmemAllocationType_enum CUmemAllocationType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationGranularity_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAllocationType_enum __pyx_t_4cuda_5ccuda_CUmemAllocationType;

/* "cuda/ccuda.pxd":1389
 *     CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1
 * 
 * ctypedef CUmemAllocationGranularity_flags_enum CUmemAllocationGranularity_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUarraySparseSubresourceType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags_enum __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags;

/* "cuda/ccuda.pxd":1395
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1
 * 
 * ctypedef CUarraySparseSubresourceType_enum CUarraySparseSubresourceType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemOperationType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUarraySparseSubresourceType_enum __pyx_t_4cuda_5ccuda_CUarraySparseSubresourceType;

/* "cuda/ccuda.pxd":1401
 *     CU_MEM_OPERATION_TYPE_UNMAP = 2
 * 
 * ctypedef CUmemOperationType_enum CUmemOperationType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemHandleType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemOperationType_enum __pyx_t_4cuda_5ccuda_CUmemOperationType;

/* "cuda/ccuda.pxd":1406
 *     CU_MEM_HANDLE_TYPE_GENERIC = 0
 * 
 * ctypedef CUmemHandleType_enum CUmemHandleType             # <<<<<<<<<<<<<<
 * 
 * cdef union _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemHandleType_enum __pyx_t_4cuda_5ccuda_CUmemHandleType;

/* "cuda/ccuda.pxd":1408
 * ctypedef CUmemHandleType_enum CUmemHandleType
 * 
 * cdef union _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u:             # <<<<<<<<<<<<<<
 *     CUmipmappedArray mipmap
 *     CUarray array
 */
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u {
  __pyx_t_4cuda_5ccuda_CUmipmappedArray mipmap;
  __pyx_t_4cuda_5ccuda_CUarray array;
};

/* "cuda/ccuda.pxd":1412
 *     CUarray array
 * 
 * cdef struct _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s:             # <<<<<<<<<<<<<<
 *     unsigned int level
 *     unsigned int layer
 */
struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s {
  unsigned int level;
  unsigned int layer;
  unsigned int offsetX;
  unsigned int offsetY;
  unsigned int offsetZ;
  unsigned int extentWidth;
  unsigned int extentHeight;
  unsigned int extentDepth;
};

/* "cuda/ccuda.pxd":1422
 *     unsigned int extentDepth
 * 
 * cdef struct _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s:             # <<<<<<<<<<<<<<
 *     unsigned int layer
 *     unsigned long long offset
 */
struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s {
  unsigned int layer;
  unsigned PY_LONG_LONG offset;
  unsigned PY_LONG_LONG size;
};

/* "cuda/ccuda.pxd":1427
 *     unsigned long long size
 * 
 * cdef union _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u:             # <<<<<<<<<<<<<<
 *     _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s sparseLevel
 *     _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s miptail
 */
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u {
  struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s sparseLevel;
  struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s miptail;
};

/* "cuda/ccuda.pxd":1431
 *     _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s miptail
 * 
 * cdef union _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u:             # <<<<<<<<<<<<<<
 *     CUmemGenericAllocationHandle memHandle
 * 
 */
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u {
  __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle memHandle;
};

/* "cuda/ccuda.pxd":1434
 *     CUmemGenericAllocationHandle memHandle
 * 
 * cdef struct CUarrayMapInfo_st:             # <<<<<<<<<<<<<<
 *     CUresourcetype resourceType
 *     _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u resource
 */
struct __pyx_t_4cuda_5ccuda_CUarrayMapInfo_st {
  __pyx_t_4cuda_5ccuda_CUresourcetype resourceType;
  union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u resource;
  __pyx_t_4cuda_5ccuda_CUarraySparseSubresourceType subresourceType;
  union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u subresource;
  __pyx_t_4cuda_5ccuda_CUmemOperationType memOperationType;
  __pyx_t_4cuda_5ccuda_CUmemHandleType memHandleType;
  union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u memHandle;
  unsigned PY_LONG_LONG offset;
  unsigned int deviceBitMask;
  unsigned int flags;
  unsigned int reserved[2];
};

/* "cuda/ccuda.pxd":1447
 *     unsigned int reserved[2]
 * 
 * ctypedef CUarrayMapInfo_st CUarrayMapInfo_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUarrayMapInfo_v1 CUarrayMapInfo
 */
typedef struct __pyx_t_4cuda_5ccuda_CUarrayMapInfo_st __pyx_t_4cuda_5ccuda_CUarrayMapInfo_v1;

/* "cuda/ccuda.pxd":1449
 * ctypedef CUarrayMapInfo_st CUarrayMapInfo_v1
 * 
 * ctypedef CUarrayMapInfo_v1 CUarrayMapInfo             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUmemLocation_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUarrayMapInfo_v1 __pyx_t_4cuda_5ccuda_CUarrayMapInfo;

/* "cuda/ccuda.pxd":1451
 * ctypedef CUarrayMapInfo_v1 CUarrayMapInfo
 * 
 * cdef struct CUmemLocation_st:             # <<<<<<<<<<<<<<
 *     CUmemLocationType type
 *     int id
 */
struct __pyx_t_4cuda_5ccuda_CUmemLocation_st {
  __pyx_t_4cuda_5ccuda_CUmemLocationType type;
  int id;
};

/* "cuda/ccuda.pxd":1455
 *     int id
 * 
 * ctypedef CUmemLocation_st CUmemLocation_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemLocation_v1 CUmemLocation
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemLocation_st __pyx_t_4cuda_5ccuda_CUmemLocation_v1;

/* "cuda/ccuda.pxd":1457
 * ctypedef CUmemLocation_st CUmemLocation_v1
 * 
 * ctypedef CUmemLocation_v1 CUmemLocation             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationCompType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemLocation_v1 __pyx_t_4cuda_5ccuda_CUmemLocation;

/* "cuda/ccuda.pxd":1463
 *     CU_MEM_ALLOCATION_COMP_GENERIC = 1
 * 
 * ctypedef CUmemAllocationCompType_enum CUmemAllocationCompType             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAllocationCompType_enum __pyx_t_4cuda_5ccuda_CUmemAllocationCompType;

/* "cuda/ccuda.pxd":1465
 * ctypedef CUmemAllocationCompType_enum CUmemAllocationCompType
 * 
 * cdef struct _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s:             # <<<<<<<<<<<<<<
 *     unsigned char compressionType
 *     unsigned char gpuDirectRDMACapable
 */
struct __pyx_t_4cuda_5ccuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s {
  unsigned char compressionType;
  unsigned char gpuDirectRDMACapable;
  unsigned short usage;
  unsigned char reserved[4];
};

/* "cuda/ccuda.pxd":1471
 *     unsigned char reserved[4]
 * 
 * cdef struct CUmemAllocationProp_st:             # <<<<<<<<<<<<<<
 *     CUmemAllocationType type
 *     CUmemAllocationHandleType requestedHandleTypes
 */
struct __pyx_t_4cuda_5ccuda_CUmemAllocationProp_st {
  __pyx_t_4cuda_5ccuda_CUmemAllocationType type;
  __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType requestedHandleTypes;
  __pyx_t_4cuda_5ccuda_CUmemLocation location;
  void *win32HandleMetaData;
  struct __pyx_t_4cuda_5ccuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s allocFlags;
};

/* "cuda/ccuda.pxd":1478
 *     _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s allocFlags
 * 
 * ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemAllocationProp_v1 CUmemAllocationProp
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemAllocationProp_st __pyx_t_4cuda_5ccuda_CUmemAllocationProp_v1;

/* "cuda/ccuda.pxd":1480
 * ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1
 * 
 * ctypedef CUmemAllocationProp_v1 CUmemAllocationProp             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUmemAccessDesc_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemAllocationProp_v1 __pyx_t_4cuda_5ccuda_CUmemAllocationProp;

/* "cuda/ccuda.pxd":1482
 * ctypedef CUmemAllocationProp_v1 CUmemAllocationProp
 * 
 * cdef struct CUmemAccessDesc_st:             # <<<<<<<<<<<<<<
 *     CUmemLocation location
 *     CUmemAccess_flags flags
 */
struct __pyx_t_4cuda_5ccuda_CUmemAccessDesc_st {
  __pyx_t_4cuda_5ccuda_CUmemLocation location;
  __pyx_t_4cuda_5ccuda_CUmemAccess_flags flags;
};

/* "cuda/ccuda.pxd":1486
 *     CUmemAccess_flags flags
 * 
 * ctypedef CUmemAccessDesc_st CUmemAccessDesc_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemAccessDesc_v1 CUmemAccessDesc
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemAccessDesc_st __pyx_t_4cuda_5ccuda_CUmemAccessDesc_v1;

/* "cuda/ccuda.pxd":1488
 * ctypedef CUmemAccessDesc_st CUmemAccessDesc_v1
 * 
 * ctypedef CUmemAccessDesc_v1 CUmemAccessDesc             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphExecUpdateResult_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemAccessDesc_v1 __pyx_t_4cuda_5ccuda_CUmemAccessDesc;

/* "cuda/ccuda.pxd":1501
 *     CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = 8
 * 
 * ctypedef CUgraphExecUpdateResult_enum CUgraphExecUpdateResult             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemPool_attribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult_enum __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult;

/* "cuda/ccuda.pxd":1513
 *     CU_MEMPOOL_ATTR_USED_MEM_HIGH = 8
 * 
 * ctypedef CUmemPool_attribute_enum CUmemPool_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUmemPoolProps_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemPool_attribute_enum __pyx_t_4cuda_5ccuda_CUmemPool_attribute;

/* "cuda/ccuda.pxd":1515
 * ctypedef CUmemPool_attribute_enum CUmemPool_attribute
 * 
 * cdef struct CUmemPoolProps_st:             # <<<<<<<<<<<<<<
 *     CUmemAllocationType allocType
 *     CUmemAllocationHandleType handleTypes
 */
struct __pyx_t_4cuda_5ccuda_CUmemPoolProps_st {
  __pyx_t_4cuda_5ccuda_CUmemAllocationType allocType;
  __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType handleTypes;
  __pyx_t_4cuda_5ccuda_CUmemLocation location;
  void *win32SecurityAttributes;
  unsigned char reserved[64];
};

/* "cuda/ccuda.pxd":1522
 *     unsigned char reserved[64]
 * 
 * ctypedef CUmemPoolProps_st CUmemPoolProps_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemPoolProps_v1 CUmemPoolProps
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemPoolProps_st __pyx_t_4cuda_5ccuda_CUmemPoolProps_v1;

/* "cuda/ccuda.pxd":1524
 * ctypedef CUmemPoolProps_st CUmemPoolProps_v1
 * 
 * ctypedef CUmemPoolProps_v1 CUmemPoolProps             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUmemPoolPtrExportData_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemPoolProps_v1 __pyx_t_4cuda_5ccuda_CUmemPoolProps;

/* "cuda/ccuda.pxd":1526
 * ctypedef CUmemPoolProps_v1 CUmemPoolProps
 * 
 * cdef struct CUmemPoolPtrExportData_st:             # <<<<<<<<<<<<<<
 *     unsigned char reserved[64]
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_st {
  unsigned char reserved[64];
};

/* "cuda/ccuda.pxd":1529
 *     unsigned char reserved[64]
 * 
 * ctypedef CUmemPoolPtrExportData_st CUmemPoolPtrExportData_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemPoolPtrExportData_v1 CUmemPoolPtrExportData
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_st __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_v1;

/* "cuda/ccuda.pxd":1531
 * ctypedef CUmemPoolPtrExportData_st CUmemPoolPtrExportData_v1
 * 
 * ctypedef CUmemPoolPtrExportData_v1 CUmemPoolPtrExportData             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_v1 __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData;

/* "cuda/ccuda.pxd":1533
 * ctypedef CUmemPoolPtrExportData_v1 CUmemPoolPtrExportData
 * 
 * cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUmemPoolProps poolProps
 *     const CUmemAccessDesc* accessDescs
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUmemPoolProps poolProps;
  __pyx_t_4cuda_5ccuda_CUmemAccessDesc const *accessDescs;
  size_t accessDescCount;
  size_t bytesize;
  __pyx_t_4cuda_5ccuda_CUdeviceptr dptr;
};

/* "cuda/ccuda.pxd":1540
 *     CUdeviceptr dptr
 * 
 * ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_st CUDA_MEM_ALLOC_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphMem_attribute_enum:
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS;

/* "cuda/ccuda.pxd":1548
 *     CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = 3
 * 
 * ctypedef CUgraphMem_attribute_enum CUgraphMem_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUflushGPUDirectRDMAWritesOptions_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphMem_attribute_enum __pyx_t_4cuda_5ccuda_CUgraphMem_attribute;

/* "cuda/ccuda.pxd":1554
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 2
 * 
 * ctypedef CUflushGPUDirectRDMAWritesOptions_enum CUflushGPUDirectRDMAWritesOptions             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUGPUDirectRDMAWritesOrdering_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions_enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions;

/* "cuda/ccuda.pxd":1561
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = 200
 * 
 * ctypedef CUGPUDirectRDMAWritesOrdering_enum CUGPUDirectRDMAWritesOrdering             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUflushGPUDirectRDMAWritesScope_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGPUDirectRDMAWritesOrdering_enum __pyx_t_4cuda_5ccuda_CUGPUDirectRDMAWritesOrdering;

/* "cuda/ccuda.pxd":1567
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 200
 * 
 * ctypedef CUflushGPUDirectRDMAWritesScope_enum CUflushGPUDirectRDMAWritesScope             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUflushGPUDirectRDMAWritesTarget_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope_enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope;

/* "cuda/ccuda.pxd":1572
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0
 * 
 * ctypedef CUflushGPUDirectRDMAWritesTarget_enum CUflushGPUDirectRDMAWritesTarget             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphDebugDot_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget_enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget;

/* "cuda/ccuda.pxd":1589
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = 4096
 * 
 * ctypedef CUgraphDebugDot_flags_enum CUgraphDebugDot_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUuserObject_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphDebugDot_flags_enum __pyx_t_4cuda_5ccuda_CUgraphDebugDot_flags;

/* "cuda/ccuda.pxd":1594
 *     CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = 1
 * 
 * ctypedef CUuserObject_flags_enum CUuserObject_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUuserObjectRetain_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUuserObject_flags_enum __pyx_t_4cuda_5ccuda_CUuserObject_flags;

/* "cuda/ccuda.pxd":1599
 *     CU_GRAPH_USER_OBJECT_MOVE = 1
 * 
 * ctypedef CUuserObjectRetain_flags_enum CUuserObjectRetain_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphInstantiate_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUuserObjectRetain_flags_enum __pyx_t_4cuda_5ccuda_CUuserObjectRetain_flags;

/* "cuda/ccuda.pxd":1604
 *     CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1
 * 
 * ctypedef CUgraphInstantiate_flags_enum CUgraphInstantiate_flags             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphInstantiate_flags_enum __pyx_t_4cuda_5ccuda_CUgraphInstantiate_flags;

/* "cuda/ccuda.pxd":2318
 *     CU_OUT_CSV = 1
 * 
 * ctypedef CUoutput_mode_enum CUoutput_mode             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef enum __pyx_t_4cuda_5ccuda_CUoutput_mode_enum __pyx_t_4cuda_5ccuda_CUoutput_mode;

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

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

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

/* "cuda/ccuda.pxd":2369
 *     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":2375
 *     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":2494
 *     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":2496
 * 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 {
  __pyx_t_4cuda_5ccuda_CUarray pArray[3];
  void *pPitch[3];
};

/* "cuda/ccuda.pxd":2500
 *     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;
  __pyx_t_4cuda_5ccuda_CUarray_format cuFormat;
};

/* "cuda/ccuda.pxd":2512
 *     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":2514
 * 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":2519
 *     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":2554
 *     CU_GL_DEVICE_LIST_NEXT_FRAME = 3
 * 
 * ctypedef CUGLDeviceList_enum CUGLDeviceList             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum __pyx_t_4cuda_5ccuda_CUGLDeviceList;

/* "cuda/ccuda.pxd":2563
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
 * 
 * ctypedef CUGLmap_flags_enum CUGLmap_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_VERSION = 11060
 */
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 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));

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

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

/* 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);

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

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

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

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

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

/* 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)

/* 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 __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5ccuda_cuGetProcAddress)(char const *, void **, int, __pyx_t_4cuda_5ccuda_cuuint64_t); /*proto*/

/* Module declarations from 'cuda._lib.dlfcn' */

/* 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___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___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___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___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___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___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_utf_8[] = "utf-8";
static const char __pyx_k_getenv[] = "getenv";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_maxsize[] = "maxsize";
static const char __pyx_k_encoding[] = "encoding";
static const char __pyx_k_libcuda_so[] = "libcuda.so";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_Function_cuInit_not_found[] = "Function \"cuInit\" not found";
static const char __pyx_k_Failed_to_dlopen_libcuda_so[] = "Failed to dlopen libcuda.so";
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_Function_cuMemUnmap_not_found[] = "Function \"cuMemUnmap\" not found";
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_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_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_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_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_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_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_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_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_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_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_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_cuStreamWriteValue64_no[] = "Function \"cuStreamWriteValue64\" 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_Function_cuStreamGetCaptureInfo_2[] = "Function \"cuStreamGetCaptureInfo_v2\" not found";
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 PyObject *__pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA;
static PyObject *__pyx_kp_u_Failed_to_dlopen_libcuda_so;
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_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_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_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_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_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_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_cuOccupancyMaxPotential;
static PyObject *__pyx_kp_u_Function_cuOccupancyMaxPotential_2;
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_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_cuStreamWaitValue64_not;
static PyObject *__pyx_kp_u_Function_cuStreamWriteValue32_no;
static PyObject *__pyx_kp_u_Function_cuStreamWriteValue64_no;
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_RuntimeError;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_encoding;
static PyObject *__pyx_n_s_getenv;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_kp_u_libcuda_so;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_maxsize;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_u_utf_8;
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;
/* Late includes */

/* "cuda/_cuda/ccuda.pyx":395
 * 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;
  void *__pyx_v_handle;
  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;
  char const *__pyx_t_7;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_8;
  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], 395, 1, __PYX_ERR(0, 395, __pyx_L1_error));

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

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

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

    /* "cuda/_cuda/ccuda.pyx":400
 *     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":401
 *         return 0
 *     __cuPythonInit = True
 *     with gil:             # <<<<<<<<<<<<<<
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)
 *     cdef char libPath[260]
 */
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "cuda/_cuda/ccuda.pyx":402
 *     __cuPythonInit = True
 *     with gil:
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)             # <<<<<<<<<<<<<<
 *     cdef char libPath[260]
 *     libPath[0] = 0
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __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, 402, __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, 402, __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, 402, __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, 402, __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, 402, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_usePTDS = __pyx_t_1;
        }

        /* "cuda/_cuda/ccuda.pyx":401
 *         return 0
 *     __cuPythonInit = True
 *     with gil:             # <<<<<<<<<<<<<<
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)
 *     cdef char libPath[260]
 */
        /*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":404
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)
 *     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":405
 *     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":406
 *     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, 406, __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, 406, __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, 406, __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, 406, __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":407
 *     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":408
 *         status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32)
 *         if status == 0 and len(libPath) != 0:
 *             path = libPath.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             IF UNAME_SYSNAME == "Windows":
 */
            __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, 408, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_v_path = __pyx_t_4;
            __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":407
 *     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":413
 *                 path = 'nvcuda.dll'
 *             ELSE:
 *                 path = 'libcuda.so'             # <<<<<<<<<<<<<<
 * 
 *         IF UNAME_SYSNAME == "Windows":
 */
          /*else*/ {
            __Pyx_INCREF(__pyx_kp_u_libcuda_so);
            __pyx_v_path = __pyx_kp_u_libcuda_so;
          }
          __pyx_L13:;

          /* "cuda/_cuda/ccuda.pyx":422
 *                 raise RuntimeError('Failed to LoadLibraryEx ' + path)
 *         ELSE:
 *             handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW)             # <<<<<<<<<<<<<<
 *             if (handle == NULL):
 *                 raise RuntimeError('Failed to dlopen libcuda.so')
 */
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_u_utf_8) < 0) __PYX_ERR(0, 422, __pyx_L11_error)
          __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_7 = __Pyx_PyBytes_AsString(__pyx_t_3); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 422, __pyx_L11_error)
          __pyx_v_handle = dlopen(__pyx_t_7, RTLD_NOW);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "cuda/_cuda/ccuda.pyx":423
 *         ELSE:
 *             handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW)
 *             if (handle == NULL):             # <<<<<<<<<<<<<<
 *                 raise RuntimeError('Failed to dlopen libcuda.so')
 *     global __cuGetErrorString
 */
          __pyx_t_1 = ((__pyx_v_handle == NULL) != 0);
          if (unlikely(__pyx_t_1)) {

            /* "cuda/_cuda/ccuda.pyx":424
 *             handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW)
 *             if (handle == NULL):
 *                 raise RuntimeError('Failed to dlopen libcuda.so')             # <<<<<<<<<<<<<<
 *     global __cuGetErrorString
 *     global __cuGetErrorName
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 424, __pyx_L11_error)

            /* "cuda/_cuda/ccuda.pyx":423
 *         ELSE:
 *             handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW)
 *             if (handle == NULL):             # <<<<<<<<<<<<<<
 *                 raise RuntimeError('Failed to dlopen libcuda.so')
 *     global __cuGetErrorString
 */
          }
        }

        /* "cuda/_cuda/ccuda.pyx":405
 *     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":809
 *                 pass
 *     ELSE:
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')             # <<<<<<<<<<<<<<
 * 
 *     if __cuGetProcAddress != NULL:
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress = dlsym(__pyx_v_handle, ((char const *)"cuGetProcAddress"));

    /* "cuda/_cuda/ccuda.pyx":811
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 * 
 *     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":812
 * 
 *     if __cuGetProcAddress != NULL:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
      __pyx_t_1 = (__pyx_v_usePTDS != 0);
      if (__pyx_t_1) {

        /* "cuda/_cuda/ccuda.pyx":814
 *         if usePTDS:
 *             # Get all PTDS version of functions
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 814, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":815
 *             # Get all PTDS version of functions
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 815, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":816
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 816, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":817
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 817, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":818
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 818, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":819
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 819, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":820
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 820, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":821
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 821, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":822
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 822, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":823
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 823, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":824
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 824, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":825
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2DUnaligned"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 825, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":826
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 826, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":827
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 827, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":828
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 828, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":829
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 829, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":830
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 830, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":831
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 831, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":832
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 832, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":833
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoAAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 833, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":834
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 834, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":835
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 835, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":836
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 836, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":837
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 837, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":838
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 838, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":839
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 839, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":840
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 840, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":841
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 841, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":842
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 842, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":843
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 843, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":844
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 844, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":845
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 845, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":846
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 846, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":847
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 847, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":848
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 848, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":849
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 849, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":850
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemMapArrayAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 850, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":851
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemFreeAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 851, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":852
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 852, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":853
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocFromPoolAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 853, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":854
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 854, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":855
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetPriority"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 855, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":856
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 856, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":857
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx), 0x233C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 857, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":858
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 858, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":859
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamAddCallback"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 859, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":860
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBeginCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2), 0x271A, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 860, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":861
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamEndCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 861, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":862
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamIsCapturing"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 862, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":863
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo), 0x271A, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 863, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":864
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 864, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":865
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 865, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":866
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamAttachMemAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 866, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":867
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamQuery"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 867, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":868
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 868, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":869
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamCopyAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 869, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":870
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 870, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":871
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 871, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":872
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventRecord"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 872, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":873
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventRecordWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 873, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":874
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSignalExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 874, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":875
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuWaitExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 875, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":876
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 876, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":877
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 877, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":878
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 878, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":879
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 879, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":880
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 880, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":881
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 881, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":882
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchCooperativeKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 882, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":883
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchHostFunc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 883, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":884
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphUpload"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 884, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":885
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphLaunch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 885, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":886
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *         else:
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsMapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 886, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":887
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *         else:
 *             # Else get the regular version
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsUnmapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 887, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":812
 * 
 *     if __cuGetProcAddress != NULL:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        goto __pyx_L18;
      }

      /* "cuda/_cuda/ccuda.pyx":890
 *         else:
 *             # Else get the regular version
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      /*else*/ {
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 890, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":891
 *             # Else get the regular version
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 891, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":892
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 892, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":893
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 893, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":894
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 894, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":895
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 895, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":896
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 896, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":897
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 897, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":898
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 898, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":899
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 899, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":900
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 900, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":901
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2DUnaligned"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 901, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":902
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 902, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":903
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 903, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":904
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 904, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":905
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 905, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":906
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 906, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":907
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 907, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":908
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 908, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":909
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoAAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 909, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":910
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 910, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":911
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 911, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":912
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 912, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":913
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 913, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":914
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 914, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":915
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 915, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":916
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 916, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":917
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 917, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":918
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 918, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":919
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 919, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":920
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 920, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":921
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 921, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":922
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 922, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":923
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 923, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":924
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 924, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":925
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 925, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":926
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemMapArrayAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 926, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":927
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemFreeAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 927, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":928
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 928, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":929
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocFromPoolAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 929, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":930
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 930, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":931
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetPriority"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority), 0x13BA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 931, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":932
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags), 0x13BA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 932, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":933
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx), 0x233C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 933, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":934
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 934, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":935
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamAddCallback"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 935, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":936
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBeginCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2), 0x271A, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 936, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":937
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamEndCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 937, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":938
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamIsCapturing"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 938, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":939
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo), 0x271A, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 939, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":940
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 940, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":941
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 941, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":942
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamAttachMemAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync), 0x1770, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 942, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":943
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamQuery"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 943, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":944
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 944, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":945
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamCopyAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 945, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":946
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 946, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":947
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 947, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":948
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventRecord"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 948, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":949
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventRecordWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 949, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":950
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSignalExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 950, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":951
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuWaitExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 951, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":952
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 952, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":953
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 953, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":954
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 954, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":955
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 955, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":956
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 956, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":957
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 957, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":958
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchCooperativeKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 958, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":959
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchHostFunc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 959, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":960
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphUpload"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 960, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":961
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphLaunch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 961, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":962
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         # Get remaining functions
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsMapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 962, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":963
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         # Get remaining functions
 *         cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsUnmapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 963, __pyx_L4_error)
      }
      __pyx_L18:;

      /* "cuda/_cuda/ccuda.pyx":965
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         # Get remaining functions
 *         cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetErrorString"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString), 0x1770, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 965, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":966
 *         # Get remaining functions
 *         cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetErrorName"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName), 0x1770, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 966, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":967
 *         cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuInit"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuInit), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 967, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":968
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDriverGetVersion"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion), 0x7E4, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 968, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":969
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGet"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 969, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":970
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetCount"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 970, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":971
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetName"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 971, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":972
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetUuid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid), 0x233C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 972, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":973
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetUuid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 973, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":974
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetLuid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 974, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":975
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceTotalMem"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 975, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":976
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetTexture1DLinearMaxWidth"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 976, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":977
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 977, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":978
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetNvSciSyncAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 978, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":979
 *         cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceSetMemPool"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 979, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":980
 *         cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetMemPool"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 980, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":981
 *         cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetDefaultMemPool"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 981, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":982
 *         cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFlushGPUDirectRDMAWrites"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 982, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":983
 *         cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetProperties"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 983, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":984
 *         cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceComputeCapability"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 984, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":985
 *         cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxRetain"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 985, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":986
 *         cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxRelease"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 986, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":987
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxSetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 987, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":988
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxGetState"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 988, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":989
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxReset"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 989, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":990
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetExecAffinitySupport"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 990, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":991
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 991, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":992
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v3), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 992, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":993
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 993, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":994
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxPushCurrent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 994, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":995
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxPopCurrent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 995, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":996
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetCurrent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 996, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":997
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetCurrent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 997, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":998
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetDevice"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 998, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":999
 *         cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 999, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1000
 *         cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1000, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1001
 *         cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetLimit"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit), 0xBC2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1001, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1002
 *         cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetLimit"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit), 0xBC2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1002, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1003
 *         cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetCacheConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1003, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1004
 *         cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetCacheConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1004, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1005
 *         cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetSharedMemConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig), 0xFB4, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1005, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1006
 *         cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetSharedMemConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig), 0xFB4, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1006, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1007
 *         cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetApiVersion"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1007, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1008
 *         cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetStreamPriorityRange"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange), 0x13BA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1008, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1009
 *         cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxResetPersistingL2Cache"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1009, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1010
 *         cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetExecAffinity"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1010, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1011
 *         cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxAttach"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1011, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1012
 *         cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxDetach"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1012, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1013
 *         cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleLoad"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1013, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1014
 *         cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleLoadData"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1014, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1015
 *         cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleLoadDataEx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx), 0x7DA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1015, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1016
 *         cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleLoadFatBinary"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1016, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1017
 *         cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleUnload"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1017, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1018
 *         cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetFunction"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1018, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1019
 *         cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetGlobal"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1019, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1020
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetTexRef"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1020, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1021
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetSurfRef"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1021, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1022
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2), 0x17A2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1022, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1023
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkAddData"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2), 0x17A2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1023, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1024
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkAddFile"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2), 0x17A2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1024, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1025
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkComplete"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete), 0x13BA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1025, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1026
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy), 0x13BA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1026, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1027
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1027, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1028
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAlloc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1028, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1029
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocPitch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1029, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1030
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemFree"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1030, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1031
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetAddressRange"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1031, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1032
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocHost"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1032, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1033
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemFreeHost"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1033, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1034
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostAlloc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc), 0x7E4, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1034, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1035
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostGetDevicePointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1035, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1036
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags), 0x7EE, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1036, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1037
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocManaged"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged), 0x1770, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1037, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1038
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetByPCIBusId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId), 0xFAA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1038, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1039
 *         cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetPCIBusId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId), 0xFAA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1039, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1040
 *         cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcGetEventHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle), 0xFAA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1040, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1041
 *         cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcOpenEventHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle), 0xFAA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1041, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1042
 *         cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcGetMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle), 0xFAA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1042, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1043
 *         cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcOpenMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1043, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1044
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcCloseMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle), 0xFAA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1044, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1045
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostRegister"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2), 0x17A2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1045, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1046
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostUnregister"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1046, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1047
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1047, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1048
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayGetDescriptor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1048, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1049
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayGetSparseProperties"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1049, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1050
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayGetSparseProperties"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1050, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1051
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayGetMemoryRequirements"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements), 0x2B34, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1051, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1052
 *         cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayGetMemoryRequirements"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements), 0x2B34, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1052, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1053
 *         cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayGetPlane"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1053, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1054
 *         cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1054, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1055
 *         cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArray3DCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1055, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1056
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArray3DGetDescriptor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1056, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1057
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1057, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1058
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayGetLevel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1058, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1059
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1059, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1060
 *         cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAddressReserve"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1060, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1061
 *         cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAddressFree"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1061, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1062
 *         cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemCreate), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1062, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1063
 *         cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemRelease"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1063, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1064
 *         cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemMap"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemMap), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1064, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1065
 *         cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemUnmap"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1065, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1066
 *         cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemSetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1066, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1067
 *         cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1067, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1068
 *         cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemExportToShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1068, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1069
 *         cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemImportFromShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1069, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1070
 *         cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetAllocationGranularity"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1070, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1071
 *         cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetAllocationPropertiesFromHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1071, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1072
 *         cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemRetainAllocationHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1072, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1073
 *         cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolTrimTo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1073, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1074
 *         cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1074, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1075
 *         cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1075, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1076
 *         cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolSetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1076, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1077
 *         cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolGetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1077, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1078
 *         cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1078, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1079
 *         cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1079, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1080
 *         cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolExportToShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1080, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1081
 *         cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolImportFromShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1081, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1082
 *         cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolExportPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1082, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1083
 *         cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolImportPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1083, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1084
 *         cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuPointerGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1084, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1085
 *         cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAdvise"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1085, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1086
 *         cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemRangeGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1086, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1087
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemRangeGetAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1087, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1088
 *         cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuPointerSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute), 0x1770, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1088, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1089
 *         cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuPointerGetAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1089, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1090
 *         cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1090, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1091
 *         cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamCreateWithPriority"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority), 0x13BA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1091, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1092
 *         cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuThreadExchangeStreamCaptureMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode), 0x271A, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1092, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1093
 *         cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1093, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1094
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1094, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1095
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventQuery"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1095, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1096
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1096, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1097
 *         cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1097, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1098
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventElapsedTime"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1098, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1099
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuImportExternalMemory"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1099, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1100
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuExternalMemoryGetMappedBuffer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1100, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1101
 *         cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuExternalMemoryGetMappedMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1101, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1102
 *         cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDestroyExternalMemory"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1102, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1103
 *         cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuImportExternalSemaphore"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1103, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1104
 *         cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDestroyExternalSemaphore"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1104, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1105
 *         cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute), 0x7E4, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1105, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1106
 *         cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1106, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1107
 *         cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetCacheConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1107, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1108
 *         cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetSharedMemConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig), 0xFB4, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1108, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1109
 *         cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncGetModule"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1109, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1110
 *         cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchCooperativeKernelMultiDevice"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1110, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1111
 *         cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetBlockShape"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1111, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1112
 *         cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetSharedSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1112, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1113
 *         cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSetSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1113, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1114
 *         cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSeti"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1114, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1115
 *         cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSetf"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1115, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1116
 *         cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSetv"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1116, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1117
 *         cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunch), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1117, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1118
 *         cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchGrid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1118, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1119
 *         cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchGridAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1119, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1120
 *         cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSetTexRef"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1120, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1121
 *         cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1121, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1122
 *         cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddKernelNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1122, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1123
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1123, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1124
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1124, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1125
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddMemcpyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1125, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1126
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemcpyNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1126, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1127
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemcpyNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1127, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1128
 *         cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddMemsetNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1128, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1129
 *         cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemsetNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1129, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1130
 *         cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemsetNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1130, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1131
 *         cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddHostNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1131, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1132
 *         cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphHostNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1132, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1133
 *         cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphHostNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1133, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1134
 *         cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddChildGraphNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1134, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1135
 *         cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphChildGraphNodeGetGraph"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1135, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1136
 *         cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddEmptyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1136, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1137
 *         cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddEventRecordNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1137, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1138
 *         cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphEventRecordNodeGetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1138, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1139
 *         cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphEventRecordNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1139, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1140
 *         cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddEventWaitNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1140, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1141
 *         cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphEventWaitNodeGetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1141, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1142
 *         cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphEventWaitNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1142, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1143
 *         cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddExternalSemaphoresSignalNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1143, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1144
 *         cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresSignalNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1144, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1145
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresSignalNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1145, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1146
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddExternalSemaphoresWaitNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1146, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1147
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresWaitNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1147, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1148
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresWaitNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1148, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1149
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddMemAllocNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1149, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1150
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemAllocNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1150, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1151
 *         cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddMemFreeNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1151, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1152
 *         cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemFreeNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1152, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1153
 *         cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGraphMemTrim"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1153, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1154
 *         cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetGraphMemAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1154, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1155
 *         cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceSetGraphMemAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1155, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1156
 *         cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphClone"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1156, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1157
 *         cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeFindInClone"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1157, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1158
 *         cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeGetType"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1158, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1159
 *         cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphGetNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1159, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1160
 *         cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphGetRootNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1160, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1161
 *         cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphGetEdges"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1161, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1162
 *         cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeGetDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1162, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1163
 *         cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeGetDependentNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1163, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1164
 *         cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1164, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1165
 *         cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphRemoveDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1165, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1166
 *         cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphDestroyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1166, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1167
 *         cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphInstantiate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiate_v2), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1167, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1168
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphInstantiateWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags), 0x2B20, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1168, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1169
 *         cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecKernelNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams), 0x271A, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1169, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1170
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecMemcpyNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1170, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1171
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecMemsetNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1171, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1172
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecHostNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1172, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1173
 *         cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecChildGraphNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1173, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1174
 *         cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecEventRecordNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1174, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1175
 *         cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecEventWaitNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent), 0x2B02, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1175, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1176
 *         cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecExternalSemaphoresSignalNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1176, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1177
 *         cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecExternalSemaphoresWaitNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams), 0x2B0C, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1177, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1178
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeSetEnabled"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled), 0x2B34, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1178, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1179
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeGetEnabled"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled), 0x2B34, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1179, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1180
 *         cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1180, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1181
 *         cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy), 0x2710, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1181, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1182
 *         cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecUpdate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1182, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1183
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeCopyAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1183, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1184
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1184, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1185
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute), 0x2AF8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1185, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1186
 *         cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphDebugDotPrint"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1186, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1187
 *         cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuUserObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1187, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1188
 *         cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuUserObjectRetain"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1188, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1189
 *         cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuUserObjectRelease"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1189, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1190
 *         cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphRetainUserObject"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1190, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1191
 *         cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphReleaseUserObject"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1191, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1192
 *         cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor), 0x17A2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1192, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1193
 *         cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1193, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1194
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxPotentialBlockSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize), 0x17A2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1194, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1195
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxPotentialBlockSizeWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1195, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1196
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyAvailableDynamicSMemPerBlock"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock), 0x2724, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1196, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1197
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1197, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1198
 *         cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1198, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1199
 *         cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1199, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1200
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetAddress2D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3), 0xFAA, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1200, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1201
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetFormat"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1201, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1202
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetAddressMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1202, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1203
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1203, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1204
 *         cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMipmapFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1204, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1205
 *         cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMipmapLevelBias"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1205, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1206
 *         cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMipmapLevelClamp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1206, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1207
 *         cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMaxAnisotropy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1207, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1208
 *         cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetBorderColor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1208, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1209
 *         cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1209, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1210
 *         cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1210, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1211
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1211, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1212
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1212, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1213
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetAddressMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1213, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1214
 *         cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1214, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1215
 *         cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetFormat"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1215, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1216
 *         cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMipmapFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1216, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1217
 *         cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMipmapLevelBias"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1217, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1218
 *         cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMipmapLevelClamp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1218, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1219
 *         cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMaxAnisotropy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1219, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1220
 *         cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetBorderColor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1220, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1221
 *         cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1221, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1222
 *         cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1222, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1223
 *         cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy), 0x7D0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1223, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1224
 *         cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfRefSetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1224, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1225
 *         cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfRefGetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1225, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1226
 *         cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1226, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1227
 *         cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1227, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1228
 *         cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectGetResourceDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1228, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1229
 *         cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectGetTextureDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1229, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1230
 *         cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectGetResourceViewDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1230, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1231
 *         cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1231, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1232
 *         cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfObjectDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1232, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1233
 *         cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfObjectGetResourceDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1233, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1234
 *         cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceCanAccessPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1234, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1235
 *         cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxEnablePeerAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1235, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1236
 *         cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxDisablePeerAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1236, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1237
 *         cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetP2PAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1237, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1238
 *         cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsUnregisterResource"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1238, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1239
 *         cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsSubResourceGetMappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1239, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1240
 *         cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsResourceGetMappedMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray), 0x1388, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1240, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1241
 *         cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsResourceGetMappedPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1241, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1242
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsResourceSetMapFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2), 0x17A2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1242, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1243
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerInitialize', &__cuProfilerInitialize, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetProcAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress), 0x2B16, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1243, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1244
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuProfilerInitialize', &__cuProfilerInitialize, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetExportTable"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1244, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1245
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerInitialize', &__cuProfilerInitialize, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuProfilerInitialize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerInitialize), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1245, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1246
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerInitialize', &__cuProfilerInitialize, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuProfilerStart"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1246, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1247
 *         cuGetProcAddress('cuProfilerInitialize', &__cuProfilerInitialize, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuProfilerStop"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop), 0xFA0, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1247, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1248
 *         cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuVDPAUGetDevice"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUGetDevice), 0xBC2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1248, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1249
 *         cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuVDPAUCtxCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUCtxCreate_v2), 0xBCC, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1249, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1250
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsVDPAURegisterVideoSurface"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface), 0xBC2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1250, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1251
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsVDPAURegisterOutputSurface"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface), 0xBC2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1251, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1252
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsEGLRegisterImage"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsEGLRegisterImage), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1252, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1253
 *         cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerConnect"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnect), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1253, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1254
 *         cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerConnectWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnectWithFlags), 0x1F40, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1254, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1255
 *         cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerDisconnect"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1255, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1256
 *         cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerAcquireFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerAcquireFrame), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1256, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1257
 *         cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerReleaseFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1257, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1258
 *         cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamProducerConnect"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerConnect), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1258, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1259
 *         cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamProducerDisconnect"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1259, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1260
 *         cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamProducerPresentFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1260, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1261
 *         cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamProducerReturnFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1261, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1262
 *         cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsResourceGetMappedEglFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedEglFrame), 0x1B58, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1262, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1263
 *         cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventCreateFromEGLSync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreateFromEGLSync), 0x2328, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1263, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1264
 *         cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsGLRegisterBuffer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterBuffer), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1264, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1265
 *         cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         return 0
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsGLRegisterImage"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage), 0xBB8, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1265, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1266
 *         cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         return 0
 *     # dlsym calls
 */
      __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGLGetDevices"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2), 0x17A2, __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1266, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1267
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         return 0             # <<<<<<<<<<<<<<
 *     # dlsym calls
 *     IF UNAME_SYSNAME == "Windows":
 */
      __pyx_r = 0;
      goto __pyx_L3_return;

      /* "cuda/_cuda/ccuda.pyx":811
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 * 
 *     if __cuGetProcAddress != NULL:             # <<<<<<<<<<<<<<
 *         if usePTDS:
 *             # Get all PTDS version of functions
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3077
 *                 pass
 *     ELSE:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds')
 */
    __pyx_t_1 = (__pyx_v_usePTDS != 0);
    if (__pyx_t_1) {

      /* "cuda/_cuda/ccuda.pyx":3079
 *         if usePTDS:
 *             # Get all PTDS version of functions
 *             __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds')
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3080
 *             # Get all PTDS version of functions
 *             __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds')
 *             __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds')
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyPeer_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3081
 *             __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds')
 *             __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds')
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds')
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoD_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3082
 *             __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds')
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds')
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds')
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoH_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3083
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds')
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds')
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds')
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoD_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3084
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds')
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds')
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds')
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoA_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3085
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds')
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds')
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds')
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoD_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3086
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds')
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds')
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds')
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoA_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3087
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds')
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds')
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds')
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoH_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3088
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds')
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds')
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds')
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoA_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3089
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds')
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds')
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds')
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2D_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3090
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds')
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds')
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds')
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2DUnaligned_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3091
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds')
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds')
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds')
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3D_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3092
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds')
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds')
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz')
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DPeer_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3093
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds')
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds')
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz')
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3094
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds')
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz')
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz')
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyPeerAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3095
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz')
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz')
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz')
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoDAsync_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3096
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz')
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz')
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz')
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoHAsync_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3097
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz')
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz')
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz')
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoDAsync_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3098
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz')
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz')
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz')
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoAAsync_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3099
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz')
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz')
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz')
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoHAsync_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3100
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz')
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz')
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz')
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2DAsync_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3101
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz')
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz')
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz')
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DAsync_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3102
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz')
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz')
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds')
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DPeerAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3103
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz')
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz')
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds')
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD8_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3104
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz')
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds')
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds')
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD16_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3105
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds')
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds')
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds')
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD32_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3106
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds')
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds')
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds')
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D8_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3107
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds')
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds')
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds')
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3108
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds')
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds')
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds')             # <<<<<<<<<<<<<<
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz')
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32_v2_ptds"));

      /* "cuda/_cuda/ccuda.pyx":3109
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds')
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds')
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz')
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD8Async_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3110
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds')
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz')
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz')
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD16Async_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3111
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz')
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz')
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz')
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD32Async_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3112
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz')
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz')
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz')
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D8Async_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3113
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz')
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz')
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz')
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16Async_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3114
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz')
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz')
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz')
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32Async_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3115
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz')
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz')
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz')
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemMapArrayAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3116
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz')
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz')
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz')
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemFreeAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3117
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz')
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz')
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz')
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3118
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz')
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz')
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz')
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocFromPoolAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3119
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz')
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz')
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz')
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemPrefetchAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3120
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz')
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz')
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz')
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetPriority_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3121
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz')
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz')
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz')
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetFlags_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3122
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz')
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz')
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz')
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCtx_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3123
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz')
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz')
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz')
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitEvent_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3124
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz')
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz')
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz')
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback = dlsym(__pyx_v_handle, ((char const *)"cuStreamAddCallback_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3125
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz')
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz')
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz')
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamBeginCapture_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3126
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz')
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz')
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz')
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture = dlsym(__pyx_v_handle, ((char const *)"cuStreamEndCapture_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3127
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz')
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz')
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_ptsz')
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing = dlsym(__pyx_v_handle, ((char const *)"cuStreamIsCapturing_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3128
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz')
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz')
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz')
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCaptureInfo_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3129
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz')
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_ptsz')
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz')
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCaptureInfo_v2_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3130
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_ptsz')
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz')
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz')
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies = dlsym(__pyx_v_handle, ((char const *)"cuStreamUpdateCaptureDependencies_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3131
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz')
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz')
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz')
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync = dlsym(__pyx_v_handle, ((char const *)"cuStreamAttachMemAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3132
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz')
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz')
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz')
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery = dlsym(__pyx_v_handle, ((char const *)"cuStreamQuery_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3133
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz')
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz')
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz')
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuStreamSynchronize_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3134
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz')
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz')
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz')
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes = dlsym(__pyx_v_handle, ((char const *)"cuStreamCopyAttributes_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3135
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz')
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz')
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz')
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetAttribute_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3136
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz')
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz')
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz')             # <<<<<<<<<<<<<<
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz')
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamSetAttribute_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3137
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz')
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz')
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz')             # <<<<<<<<<<<<<<
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz')
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord = dlsym(__pyx_v_handle, ((char const *)"cuEventRecord_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3138
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz')
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz')
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz')             # <<<<<<<<<<<<<<
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz')
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuEventRecordWithFlags_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3139
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz')
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz')
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz')
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuSignalExternalSemaphoresAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3140
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz')
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz')
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_ptsz')
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuWaitExternalSemaphoresAsync_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3141
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz')
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz')
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_ptsz')
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitValue32_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3142
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz')
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_ptsz')
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_ptsz')
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitValue64_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3143
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_ptsz')
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_ptsz')
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_ptsz')
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue32_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3144
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_ptsz')
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_ptsz')
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_ptsz')             # <<<<<<<<<<<<<<
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_ptsz')
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue64_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3145
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_ptsz')
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_ptsz')
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_ptsz')             # <<<<<<<<<<<<<<
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz')
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp = dlsym(__pyx_v_handle, ((char const *)"cuStreamBatchMemOp_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3146
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_ptsz')
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_ptsz')
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz')             # <<<<<<<<<<<<<<
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz')
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchKernel_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3147
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_ptsz')
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz')
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz')             # <<<<<<<<<<<<<<
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz')
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchCooperativeKernel_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3148
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz')
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz')
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz')             # <<<<<<<<<<<<<<
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz')
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc = dlsym(__pyx_v_handle, ((char const *)"cuLaunchHostFunc_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3149
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz')
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz')
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz')             # <<<<<<<<<<<<<<
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz')
 *             __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload = dlsym(__pyx_v_handle, ((char const *)"cuGraphUpload_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3150
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz')
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz')
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz')             # <<<<<<<<<<<<<<
 *             __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz')
 *             __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources_ptsz')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch = dlsym(__pyx_v_handle, ((char const *)"cuGraphLaunch_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3151
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz')
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz')
 *             __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz')             # <<<<<<<<<<<<<<
 *             __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources_ptsz')
 *         else:
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsMapResources_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3152
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz')
 *             __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz')
 *             __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources_ptsz')             # <<<<<<<<<<<<<<
 *         else:
 *             # Else get the regular version
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsUnmapResources_ptsz"));

      /* "cuda/_cuda/ccuda.pyx":3077
 *                 pass
 *     ELSE:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds')
 */
      goto __pyx_L19;
    }

    /* "cuda/_cuda/ccuda.pyx":3155
 *         else:
 *             # Else get the regular version
 *             __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy')             # <<<<<<<<<<<<<<
 *             __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer')
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2')
 */
    /*else*/ {
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy"));

      /* "cuda/_cuda/ccuda.pyx":3156
 *             # Else get the regular version
 *             __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy')
 *             __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer')             # <<<<<<<<<<<<<<
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2')
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyPeer"));

      /* "cuda/_cuda/ccuda.pyx":3157
 *             __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy')
 *             __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer')
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2')
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoD_v2"));

      /* "cuda/_cuda/ccuda.pyx":3158
 *             __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer')
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2')
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2')
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoH_v2"));

      /* "cuda/_cuda/ccuda.pyx":3159
 *             __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2')
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2')
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2')
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoD_v2"));

      /* "cuda/_cuda/ccuda.pyx":3160
 *             __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2')
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2')
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2')
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoA_v2"));

      /* "cuda/_cuda/ccuda.pyx":3161
 *             __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2')
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2')
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2')
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoD_v2"));

      /* "cuda/_cuda/ccuda.pyx":3162
 *             __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2')
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2')
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2')
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoA_v2"));

      /* "cuda/_cuda/ccuda.pyx":3163
 *             __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2')
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2')
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2')
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoH_v2"));

      /* "cuda/_cuda/ccuda.pyx":3164
 *             __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2')
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2')
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2')
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoA_v2"));

      /* "cuda/_cuda/ccuda.pyx":3165
 *             __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2')
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2')
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2')
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2D_v2"));

      /* "cuda/_cuda/ccuda.pyx":3166
 *             __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2')
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2')
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2')
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2DUnaligned_v2"));

      /* "cuda/_cuda/ccuda.pyx":3167
 *             __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2')
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2')
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer')
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3D_v2"));

      /* "cuda/_cuda/ccuda.pyx":3168
 *             __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2')
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2')
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync')
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DPeer"));

      /* "cuda/_cuda/ccuda.pyx":3169
 *             __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2')
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer')
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync')             # <<<<<<<<<<<<<<
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync')
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAsync"));

      /* "cuda/_cuda/ccuda.pyx":3170
 *             __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer')
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync')
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync')             # <<<<<<<<<<<<<<
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2')
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyPeerAsync"));

      /* "cuda/_cuda/ccuda.pyx":3171
 *             __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync')
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync')
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2')
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoDAsync_v2"));

      /* "cuda/_cuda/ccuda.pyx":3172
 *             __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync')
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2')
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2')
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoHAsync_v2"));

      /* "cuda/_cuda/ccuda.pyx":3173
 *             __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2')
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2')
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2')
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoDAsync_v2"));

      /* "cuda/_cuda/ccuda.pyx":3174
 *             __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2')
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2')
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2')
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoAAsync_v2"));

      /* "cuda/_cuda/ccuda.pyx":3175
 *             __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2')
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2')
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2')
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoHAsync_v2"));

      /* "cuda/_cuda/ccuda.pyx":3176
 *             __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2')
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2')
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2')
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2DAsync_v2"));

      /* "cuda/_cuda/ccuda.pyx":3177
 *             __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2')
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2')
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2')             # <<<<<<<<<<<<<<
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync')
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DAsync_v2"));

      /* "cuda/_cuda/ccuda.pyx":3178
 *             __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2')
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2')
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync')             # <<<<<<<<<<<<<<
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2')
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DPeerAsync"));

      /* "cuda/_cuda/ccuda.pyx":3179
 *             __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2')
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync')
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2')             # <<<<<<<<<<<<<<
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2')
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD8_v2"));

      /* "cuda/_cuda/ccuda.pyx":3180
 *             __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync')
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2')
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2')             # <<<<<<<<<<<<<<
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2')
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD16_v2"));

      /* "cuda/_cuda/ccuda.pyx":3181
 *             __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2')
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2')
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2')
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD32_v2"));

      /* "cuda/_cuda/ccuda.pyx":3182
 *             __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2')
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2')
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2')
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D8_v2"));

      /* "cuda/_cuda/ccuda.pyx":3183
 *             __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2')
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2')
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2')
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16_v2"));

      /* "cuda/_cuda/ccuda.pyx":3184
 *             __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2')
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2')
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2')             # <<<<<<<<<<<<<<
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async')
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32_v2"));

      /* "cuda/_cuda/ccuda.pyx":3185
 *             __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2')
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2')
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async')             # <<<<<<<<<<<<<<
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async')
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD8Async"));

      /* "cuda/_cuda/ccuda.pyx":3186
 *             __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2')
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async')
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async')             # <<<<<<<<<<<<<<
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async')
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD16Async"));

      /* "cuda/_cuda/ccuda.pyx":3187
 *             __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async')
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async')
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async')
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD32Async"));

      /* "cuda/_cuda/ccuda.pyx":3188
 *             __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async')
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async')
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async')
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D8Async"));

      /* "cuda/_cuda/ccuda.pyx":3189
 *             __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async')
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async')
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async')             # <<<<<<<<<<<<<<
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16Async"));

      /* "cuda/_cuda/ccuda.pyx":3190
 *             __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async')
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async')
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')             # <<<<<<<<<<<<<<
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32Async"));

      /* "cuda/_cuda/ccuda.pyx":3191
 *             __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async')
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')             # <<<<<<<<<<<<<<
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemMapArrayAsync"));

      /* "cuda/_cuda/ccuda.pyx":3192
 *             __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')             # <<<<<<<<<<<<<<
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemFreeAsync"));

      /* "cuda/_cuda/ccuda.pyx":3193
 *             __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')             # <<<<<<<<<<<<<<
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocAsync"));

      /* "cuda/_cuda/ccuda.pyx":3194
 *             __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')             # <<<<<<<<<<<<<<
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocFromPoolAsync"));

      /* "cuda/_cuda/ccuda.pyx":3195
 *             __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')             # <<<<<<<<<<<<<<
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority')
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemPrefetchAsync"));

      /* "cuda/_cuda/ccuda.pyx":3196
 *             __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority')             # <<<<<<<<<<<<<<
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags')
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetPriority"));

      /* "cuda/_cuda/ccuda.pyx":3197
 *             __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority')
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags')             # <<<<<<<<<<<<<<
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx')
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetFlags"));

      /* "cuda/_cuda/ccuda.pyx":3198
 *             __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority')
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags')
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx')             # <<<<<<<<<<<<<<
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent')
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCtx"));

      /* "cuda/_cuda/ccuda.pyx":3199
 *             __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags')
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx')
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent')             # <<<<<<<<<<<<<<
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback')
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitEvent"));

      /* "cuda/_cuda/ccuda.pyx":3200
 *             __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx')
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent')
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback')             # <<<<<<<<<<<<<<
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback = dlsym(__pyx_v_handle, ((char const *)"cuStreamAddCallback"));

      /* "cuda/_cuda/ccuda.pyx":3201
 *             __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent')
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback')
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')             # <<<<<<<<<<<<<<
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture')
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamBeginCapture_v2"));

      /* "cuda/_cuda/ccuda.pyx":3202
 *             __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback')
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture')             # <<<<<<<<<<<<<<
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing')
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture = dlsym(__pyx_v_handle, ((char const *)"cuStreamEndCapture"));

      /* "cuda/_cuda/ccuda.pyx":3203
 *             __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture')
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing')             # <<<<<<<<<<<<<<
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo')
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing = dlsym(__pyx_v_handle, ((char const *)"cuStreamIsCapturing"));

      /* "cuda/_cuda/ccuda.pyx":3204
 *             __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture')
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing')
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo')             # <<<<<<<<<<<<<<
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2')
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCaptureInfo"));

      /* "cuda/_cuda/ccuda.pyx":3205
 *             __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing')
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo')
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2')             # <<<<<<<<<<<<<<
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies')
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCaptureInfo_v2"));

      /* "cuda/_cuda/ccuda.pyx":3206
 *             __cuStreamGetCaptureInfo = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo')
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2')
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies')             # <<<<<<<<<<<<<<
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync')
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies = dlsym(__pyx_v_handle, ((char const *)"cuStreamUpdateCaptureDependencies"));

      /* "cuda/_cuda/ccuda.pyx":3207
 *             __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2')
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies')
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync')             # <<<<<<<<<<<<<<
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery')
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync = dlsym(__pyx_v_handle, ((char const *)"cuStreamAttachMemAsync"));

      /* "cuda/_cuda/ccuda.pyx":3208
 *             __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies')
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync')
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery')             # <<<<<<<<<<<<<<
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery = dlsym(__pyx_v_handle, ((char const *)"cuStreamQuery"));

      /* "cuda/_cuda/ccuda.pyx":3209
 *             __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync')
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery')
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')             # <<<<<<<<<<<<<<
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuStreamSynchronize"));

      /* "cuda/_cuda/ccuda.pyx":3210
 *             __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery')
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')             # <<<<<<<<<<<<<<
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes = dlsym(__pyx_v_handle, ((char const *)"cuStreamCopyAttributes"));

      /* "cuda/_cuda/ccuda.pyx":3211
 *             __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')             # <<<<<<<<<<<<<<
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetAttribute"));

      /* "cuda/_cuda/ccuda.pyx":3212
 *             __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')             # <<<<<<<<<<<<<<
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamSetAttribute"));

      /* "cuda/_cuda/ccuda.pyx":3213
 *             __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')             # <<<<<<<<<<<<<<
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord = dlsym(__pyx_v_handle, ((char const *)"cuEventRecord"));

      /* "cuda/_cuda/ccuda.pyx":3214
 *             __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')             # <<<<<<<<<<<<<<
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuEventRecordWithFlags"));

      /* "cuda/_cuda/ccuda.pyx":3215
 *             __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')             # <<<<<<<<<<<<<<
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuSignalExternalSemaphoresAsync"));

      /* "cuda/_cuda/ccuda.pyx":3216
 *             __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')             # <<<<<<<<<<<<<<
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32')
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuWaitExternalSemaphoresAsync"));

      /* "cuda/_cuda/ccuda.pyx":3217
 *             __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32')             # <<<<<<<<<<<<<<
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64')
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitValue32"));

      /* "cuda/_cuda/ccuda.pyx":3218
 *             __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32')
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64')             # <<<<<<<<<<<<<<
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32')
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitValue64"));

      /* "cuda/_cuda/ccuda.pyx":3219
 *             __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32')
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64')
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32')             # <<<<<<<<<<<<<<
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64')
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue32"));

      /* "cuda/_cuda/ccuda.pyx":3220
 *             __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64')
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32')
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64')             # <<<<<<<<<<<<<<
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue64"));

      /* "cuda/_cuda/ccuda.pyx":3221
 *             __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32')
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64')
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')             # <<<<<<<<<<<<<<
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp = dlsym(__pyx_v_handle, ((char const *)"cuStreamBatchMemOp"));

      /* "cuda/_cuda/ccuda.pyx":3222
 *             __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64')
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')             # <<<<<<<<<<<<<<
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchKernel"));

      /* "cuda/_cuda/ccuda.pyx":3223
 *             __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')             # <<<<<<<<<<<<<<
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchCooperativeKernel"));

      /* "cuda/_cuda/ccuda.pyx":3224
 *             __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')             # <<<<<<<<<<<<<<
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc = dlsym(__pyx_v_handle, ((char const *)"cuLaunchHostFunc"));

      /* "cuda/_cuda/ccuda.pyx":3225
 *             __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')             # <<<<<<<<<<<<<<
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')
 *             __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload = dlsym(__pyx_v_handle, ((char const *)"cuGraphUpload"));

      /* "cuda/_cuda/ccuda.pyx":3226
 *             __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')             # <<<<<<<<<<<<<<
 *             __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')
 *             __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch = dlsym(__pyx_v_handle, ((char const *)"cuGraphLaunch"));

      /* "cuda/_cuda/ccuda.pyx":3227
 *             __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')
 *             __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')             # <<<<<<<<<<<<<<
 *             __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')
 *         # Get remaining functions
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsMapResources"));

      /* "cuda/_cuda/ccuda.pyx":3228
 *             __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')
 *             __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')
 *             __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')             # <<<<<<<<<<<<<<
 *         # Get remaining functions
 *         __cuGetErrorString = dlfcn.dlsym(handle, 'cuGetErrorString')
 */
      __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsUnmapResources"));
    }
    __pyx_L19:;

    /* "cuda/_cuda/ccuda.pyx":3230
 *             __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')
 *         # Get remaining functions
 *         __cuGetErrorString = dlfcn.dlsym(handle, 'cuGetErrorString')             # <<<<<<<<<<<<<<
 *         __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName')
 *         __cuInit = dlfcn.dlsym(handle, 'cuInit')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString = dlsym(__pyx_v_handle, ((char const *)"cuGetErrorString"));

    /* "cuda/_cuda/ccuda.pyx":3231
 *         # Get remaining functions
 *         __cuGetErrorString = dlfcn.dlsym(handle, 'cuGetErrorString')
 *         __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName')             # <<<<<<<<<<<<<<
 *         __cuInit = dlfcn.dlsym(handle, 'cuInit')
 *         __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName = dlsym(__pyx_v_handle, ((char const *)"cuGetErrorName"));

    /* "cuda/_cuda/ccuda.pyx":3232
 *         __cuGetErrorString = dlfcn.dlsym(handle, 'cuGetErrorString')
 *         __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName')
 *         __cuInit = dlfcn.dlsym(handle, 'cuInit')             # <<<<<<<<<<<<<<
 *         __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion')
 *         __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuInit = dlsym(__pyx_v_handle, ((char const *)"cuInit"));

    /* "cuda/_cuda/ccuda.pyx":3233
 *         __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName')
 *         __cuInit = dlfcn.dlsym(handle, 'cuInit')
 *         __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion')             # <<<<<<<<<<<<<<
 *         __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet')
 *         __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion = dlsym(__pyx_v_handle, ((char const *)"cuDriverGetVersion"));

    /* "cuda/_cuda/ccuda.pyx":3234
 *         __cuInit = dlfcn.dlsym(handle, 'cuInit')
 *         __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion')
 *         __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount')
 *         __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGet"));

    /* "cuda/_cuda/ccuda.pyx":3235
 *         __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion')
 *         __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet')
 *         __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName')
 *         __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetCount"));

    /* "cuda/_cuda/ccuda.pyx":3236
 *         __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet')
 *         __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount')
 *         __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid')
 *         __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetName"));

    /* "cuda/_cuda/ccuda.pyx":3237
 *         __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount')
 *         __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName')
 *         __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2')
 *         __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetUuid"));

    /* "cuda/_cuda/ccuda.pyx":3238
 *         __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName')
 *         __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid')
 *         __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid')
 *         __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetUuid_v2"));

    /* "cuda/_cuda/ccuda.pyx":3239
 *         __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid')
 *         __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2')
 *         __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid')             # <<<<<<<<<<<<<<
 *         __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2')
 *         __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetLuid"));

    /* "cuda/_cuda/ccuda.pyx":3240
 *         __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2')
 *         __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid')
 *         __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth')
 *         __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDeviceTotalMem_v2"));

    /* "cuda/_cuda/ccuda.pyx":3241
 *         __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid')
 *         __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2')
 *         __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute')
 *         __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetTexture1DLinearMaxWidth"));

    /* "cuda/_cuda/ccuda.pyx":3242
 *         __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2')
 *         __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth')
 *         __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes')
 *         __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3243
 *         __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth')
 *         __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute')
 *         __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes')             # <<<<<<<<<<<<<<
 *         __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool')
 *         __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetNvSciSyncAttributes"));

    /* "cuda/_cuda/ccuda.pyx":3244
 *         __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute')
 *         __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes')
 *         __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool')
 *         __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool = dlsym(__pyx_v_handle, ((char const *)"cuDeviceSetMemPool"));

    /* "cuda/_cuda/ccuda.pyx":3245
 *         __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes')
 *         __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool')
 *         __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool')
 *         __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetMemPool"));

    /* "cuda/_cuda/ccuda.pyx":3246
 *         __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool')
 *         __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool')
 *         __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool')             # <<<<<<<<<<<<<<
 *         __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites')
 *         __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetDefaultMemPool"));

    /* "cuda/_cuda/ccuda.pyx":3247
 *         __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool')
 *         __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool')
 *         __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties')
 *         __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites = dlsym(__pyx_v_handle, ((char const *)"cuFlushGPUDirectRDMAWrites"));

    /* "cuda/_cuda/ccuda.pyx":3248
 *         __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool')
 *         __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites')
 *         __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties')             # <<<<<<<<<<<<<<
 *         __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability')
 *         __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetProperties"));

    /* "cuda/_cuda/ccuda.pyx":3249
 *         __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites')
 *         __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties')
 *         __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability')             # <<<<<<<<<<<<<<
 *         __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain')
 *         __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability = dlsym(__pyx_v_handle, ((char const *)"cuDeviceComputeCapability"));

    /* "cuda/_cuda/ccuda.pyx":3250
 *         __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties')
 *         __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability')
 *         __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain')             # <<<<<<<<<<<<<<
 *         __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2')
 *         __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxRetain"));

    /* "cuda/_cuda/ccuda.pyx":3251
 *         __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability')
 *         __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain')
 *         __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2')             # <<<<<<<<<<<<<<
 *         __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2')
 *         __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxRelease_v2"));

    /* "cuda/_cuda/ccuda.pyx":3252
 *         __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain')
 *         __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2')
 *         __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2')             # <<<<<<<<<<<<<<
 *         __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState')
 *         __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxSetFlags_v2"));

    /* "cuda/_cuda/ccuda.pyx":3253
 *         __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2')
 *         __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2')
 *         __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState')             # <<<<<<<<<<<<<<
 *         __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2')
 *         __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxGetState"));

    /* "cuda/_cuda/ccuda.pyx":3254
 *         __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2')
 *         __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState')
 *         __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport')
 *         __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxReset_v2"));

    /* "cuda/_cuda/ccuda.pyx":3255
 *         __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState')
 *         __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2')
 *         __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport')             # <<<<<<<<<<<<<<
 *         __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2')
 *         __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetExecAffinitySupport"));

    /* "cuda/_cuda/ccuda.pyx":3256
 *         __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2')
 *         __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport')
 *         __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2')             # <<<<<<<<<<<<<<
 *         __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3')
 *         __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuCtxCreate_v2"));

    /* "cuda/_cuda/ccuda.pyx":3257
 *         __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport')
 *         __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2')
 *         __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3')             # <<<<<<<<<<<<<<
 *         __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2')
 *         __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v3 = dlsym(__pyx_v_handle, ((char const *)"cuCtxCreate_v3"));

    /* "cuda/_cuda/ccuda.pyx":3258
 *         __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2')
 *         __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3')
 *         __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2')             # <<<<<<<<<<<<<<
 *         __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2')
 *         __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2 = dlsym(__pyx_v_handle, ((char const *)"cuCtxDestroy_v2"));

    /* "cuda/_cuda/ccuda.pyx":3259
 *         __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3')
 *         __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2')
 *         __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2')             # <<<<<<<<<<<<<<
 *         __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2')
 *         __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2 = dlsym(__pyx_v_handle, ((char const *)"cuCtxPushCurrent_v2"));

    /* "cuda/_cuda/ccuda.pyx":3260
 *         __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2')
 *         __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2')
 *         __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2')             # <<<<<<<<<<<<<<
 *         __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent')
 *         __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2 = dlsym(__pyx_v_handle, ((char const *)"cuCtxPopCurrent_v2"));

    /* "cuda/_cuda/ccuda.pyx":3261
 *         __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2')
 *         __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2')
 *         __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent')             # <<<<<<<<<<<<<<
 *         __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent')
 *         __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetCurrent"));

    /* "cuda/_cuda/ccuda.pyx":3262
 *         __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2')
 *         __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent')
 *         __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent')             # <<<<<<<<<<<<<<
 *         __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice')
 *         __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetCurrent"));

    /* "cuda/_cuda/ccuda.pyx":3263
 *         __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent')
 *         __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent')
 *         __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice')             # <<<<<<<<<<<<<<
 *         __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags')
 *         __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetDevice"));

    /* "cuda/_cuda/ccuda.pyx":3264
 *         __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent')
 *         __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice')
 *         __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags')             # <<<<<<<<<<<<<<
 *         __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize')
 *         __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetFlags"));

    /* "cuda/_cuda/ccuda.pyx":3265
 *         __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice')
 *         __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags')
 *         __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize')             # <<<<<<<<<<<<<<
 *         __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit')
 *         __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuCtxSynchronize"));

    /* "cuda/_cuda/ccuda.pyx":3266
 *         __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags')
 *         __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize')
 *         __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit')             # <<<<<<<<<<<<<<
 *         __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit')
 *         __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetLimit"));

    /* "cuda/_cuda/ccuda.pyx":3267
 *         __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize')
 *         __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit')
 *         __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit')             # <<<<<<<<<<<<<<
 *         __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig')
 *         __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetLimit"));

    /* "cuda/_cuda/ccuda.pyx":3268
 *         __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit')
 *         __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit')
 *         __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig')             # <<<<<<<<<<<<<<
 *         __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig')
 *         __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetCacheConfig"));

    /* "cuda/_cuda/ccuda.pyx":3269
 *         __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit')
 *         __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig')
 *         __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig')             # <<<<<<<<<<<<<<
 *         __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig')
 *         __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetCacheConfig"));

    /* "cuda/_cuda/ccuda.pyx":3270
 *         __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig')
 *         __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig')
 *         __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig')
 *         __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetSharedMemConfig"));

    /* "cuda/_cuda/ccuda.pyx":3271
 *         __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig')
 *         __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig')
 *         __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion')
 *         __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetSharedMemConfig"));

    /* "cuda/_cuda/ccuda.pyx":3272
 *         __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig')
 *         __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig')
 *         __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion')             # <<<<<<<<<<<<<<
 *         __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange')
 *         __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetApiVersion"));

    /* "cuda/_cuda/ccuda.pyx":3273
 *         __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig')
 *         __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion')
 *         __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange')             # <<<<<<<<<<<<<<
 *         __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache')
 *         __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetStreamPriorityRange"));

    /* "cuda/_cuda/ccuda.pyx":3274
 *         __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion')
 *         __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange')
 *         __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache')             # <<<<<<<<<<<<<<
 *         __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity')
 *         __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache = dlsym(__pyx_v_handle, ((char const *)"cuCtxResetPersistingL2Cache"));

    /* "cuda/_cuda/ccuda.pyx":3275
 *         __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange')
 *         __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache')
 *         __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity')             # <<<<<<<<<<<<<<
 *         __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach')
 *         __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetExecAffinity"));

    /* "cuda/_cuda/ccuda.pyx":3276
 *         __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache')
 *         __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity')
 *         __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach')             # <<<<<<<<<<<<<<
 *         __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach')
 *         __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach = dlsym(__pyx_v_handle, ((char const *)"cuCtxAttach"));

    /* "cuda/_cuda/ccuda.pyx":3277
 *         __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity')
 *         __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach')
 *         __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach')             # <<<<<<<<<<<<<<
 *         __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad')
 *         __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach = dlsym(__pyx_v_handle, ((char const *)"cuCtxDetach"));

    /* "cuda/_cuda/ccuda.pyx":3278
 *         __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach')
 *         __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach')
 *         __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad')             # <<<<<<<<<<<<<<
 *         __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData')
 *         __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad = dlsym(__pyx_v_handle, ((char const *)"cuModuleLoad"));

    /* "cuda/_cuda/ccuda.pyx":3279
 *         __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach')
 *         __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad')
 *         __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData')             # <<<<<<<<<<<<<<
 *         __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx')
 *         __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData = dlsym(__pyx_v_handle, ((char const *)"cuModuleLoadData"));

    /* "cuda/_cuda/ccuda.pyx":3280
 *         __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad')
 *         __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData')
 *         __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx')             # <<<<<<<<<<<<<<
 *         __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary')
 *         __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx = dlsym(__pyx_v_handle, ((char const *)"cuModuleLoadDataEx"));

    /* "cuda/_cuda/ccuda.pyx":3281
 *         __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData')
 *         __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx')
 *         __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary')             # <<<<<<<<<<<<<<
 *         __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload')
 *         __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary = dlsym(__pyx_v_handle, ((char const *)"cuModuleLoadFatBinary"));

    /* "cuda/_cuda/ccuda.pyx":3282
 *         __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx')
 *         __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary')
 *         __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload')             # <<<<<<<<<<<<<<
 *         __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction')
 *         __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload = dlsym(__pyx_v_handle, ((char const *)"cuModuleUnload"));

    /* "cuda/_cuda/ccuda.pyx":3283
 *         __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary')
 *         __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload')
 *         __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction')             # <<<<<<<<<<<<<<
 *         __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2')
 *         __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetFunction"));

    /* "cuda/_cuda/ccuda.pyx":3284
 *         __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload')
 *         __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction')
 *         __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2')             # <<<<<<<<<<<<<<
 *         __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef')
 *         __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2 = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetGlobal_v2"));

    /* "cuda/_cuda/ccuda.pyx":3285
 *         __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction')
 *         __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2')
 *         __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef')             # <<<<<<<<<<<<<<
 *         __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef')
 *         __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetTexRef"));

    /* "cuda/_cuda/ccuda.pyx":3286
 *         __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2')
 *         __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef')
 *         __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef')             # <<<<<<<<<<<<<<
 *         __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2')
 *         __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetSurfRef"));

    /* "cuda/_cuda/ccuda.pyx":3287
 *         __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef')
 *         __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef')
 *         __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2')             # <<<<<<<<<<<<<<
 *         __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2')
 *         __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuLinkCreate_v2"));

    /* "cuda/_cuda/ccuda.pyx":3288
 *         __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef')
 *         __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2')
 *         __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2')             # <<<<<<<<<<<<<<
 *         __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2')
 *         __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2 = dlsym(__pyx_v_handle, ((char const *)"cuLinkAddData_v2"));

    /* "cuda/_cuda/ccuda.pyx":3289
 *         __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2')
 *         __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2')
 *         __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2')             # <<<<<<<<<<<<<<
 *         __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete')
 *         __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2 = dlsym(__pyx_v_handle, ((char const *)"cuLinkAddFile_v2"));

    /* "cuda/_cuda/ccuda.pyx":3290
 *         __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2')
 *         __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2')
 *         __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete')             # <<<<<<<<<<<<<<
 *         __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy')
 *         __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete = dlsym(__pyx_v_handle, ((char const *)"cuLinkComplete"));

    /* "cuda/_cuda/ccuda.pyx":3291
 *         __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2')
 *         __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete')
 *         __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy')             # <<<<<<<<<<<<<<
 *         __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2')
 *         __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy = dlsym(__pyx_v_handle, ((char const *)"cuLinkDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3292
 *         __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete')
 *         __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy')
 *         __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2')             # <<<<<<<<<<<<<<
 *         __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2')
 *         __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemGetInfo_v2"));

    /* "cuda/_cuda/ccuda.pyx":3293
 *         __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy')
 *         __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2')
 *         __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2')             # <<<<<<<<<<<<<<
 *         __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2')
 *         __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemAlloc_v2"));

    /* "cuda/_cuda/ccuda.pyx":3294
 *         __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2')
 *         __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2')
 *         __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2')             # <<<<<<<<<<<<<<
 *         __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2')
 *         __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocPitch_v2"));

    /* "cuda/_cuda/ccuda.pyx":3295
 *         __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2')
 *         __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2')
 *         __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2')             # <<<<<<<<<<<<<<
 *         __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2')
 *         __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemFree_v2"));

    /* "cuda/_cuda/ccuda.pyx":3296
 *         __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2')
 *         __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2')
 *         __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2')             # <<<<<<<<<<<<<<
 *         __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2')
 *         __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAddressRange_v2"));

    /* "cuda/_cuda/ccuda.pyx":3297
 *         __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2')
 *         __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2')
 *         __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2')             # <<<<<<<<<<<<<<
 *         __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost')
 *         __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocHost_v2"));

    /* "cuda/_cuda/ccuda.pyx":3298
 *         __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2')
 *         __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2')
 *         __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost')             # <<<<<<<<<<<<<<
 *         __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc')
 *         __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost = dlsym(__pyx_v_handle, ((char const *)"cuMemFreeHost"));

    /* "cuda/_cuda/ccuda.pyx":3299
 *         __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2')
 *         __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost')
 *         __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc')             # <<<<<<<<<<<<<<
 *         __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2')
 *         __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc = dlsym(__pyx_v_handle, ((char const *)"cuMemHostAlloc"));

    /* "cuda/_cuda/ccuda.pyx":3300
 *         __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost')
 *         __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc')
 *         __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2')             # <<<<<<<<<<<<<<
 *         __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags')
 *         __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemHostGetDevicePointer_v2"));

    /* "cuda/_cuda/ccuda.pyx":3301
 *         __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc')
 *         __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2')
 *         __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags')             # <<<<<<<<<<<<<<
 *         __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged')
 *         __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuMemHostGetFlags"));

    /* "cuda/_cuda/ccuda.pyx":3302
 *         __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2')
 *         __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags')
 *         __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId')
 *         __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocManaged"));

    /* "cuda/_cuda/ccuda.pyx":3303
 *         __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags')
 *         __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged')
 *         __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId')
 *         __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetByPCIBusId"));

    /* "cuda/_cuda/ccuda.pyx":3304
 *         __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged')
 *         __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId')
 *         __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId')             # <<<<<<<<<<<<<<
 *         __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle')
 *         __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetPCIBusId"));

    /* "cuda/_cuda/ccuda.pyx":3305
 *         __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId')
 *         __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId')
 *         __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle')             # <<<<<<<<<<<<<<
 *         __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle')
 *         __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle = dlsym(__pyx_v_handle, ((char const *)"cuIpcGetEventHandle"));

    /* "cuda/_cuda/ccuda.pyx":3306
 *         __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId')
 *         __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle')
 *         __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle')             # <<<<<<<<<<<<<<
 *         __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle')
 *         __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle = dlsym(__pyx_v_handle, ((char const *)"cuIpcOpenEventHandle"));

    /* "cuda/_cuda/ccuda.pyx":3307
 *         __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle')
 *         __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle')
 *         __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle')             # <<<<<<<<<<<<<<
 *         __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2')
 *         __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle = dlsym(__pyx_v_handle, ((char const *)"cuIpcGetMemHandle"));

    /* "cuda/_cuda/ccuda.pyx":3308
 *         __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle')
 *         __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle')
 *         __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2')             # <<<<<<<<<<<<<<
 *         __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle')
 *         __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2 = dlsym(__pyx_v_handle, ((char const *)"cuIpcOpenMemHandle_v2"));

    /* "cuda/_cuda/ccuda.pyx":3309
 *         __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle')
 *         __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2')
 *         __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle')             # <<<<<<<<<<<<<<
 *         __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2')
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle = dlsym(__pyx_v_handle, ((char const *)"cuIpcCloseMemHandle"));

    /* "cuda/_cuda/ccuda.pyx":3310
 *         __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2')
 *         __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle')
 *         __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2')             # <<<<<<<<<<<<<<
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')
 *         __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemHostRegister_v2"));

    /* "cuda/_cuda/ccuda.pyx":3311
 *         __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle')
 *         __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2')
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')             # <<<<<<<<<<<<<<
 *         __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2')
 *         __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister = dlsym(__pyx_v_handle, ((char const *)"cuMemHostUnregister"));

    /* "cuda/_cuda/ccuda.pyx":3312
 *         __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2')
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')
 *         __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2')             # <<<<<<<<<<<<<<
 *         __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2')
 *         __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuArrayCreate_v2"));

    /* "cuda/_cuda/ccuda.pyx":3313
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')
 *         __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2')
 *         __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2')             # <<<<<<<<<<<<<<
 *         __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties')
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2 = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetDescriptor_v2"));

    /* "cuda/_cuda/ccuda.pyx":3314
 *         __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2')
 *         __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2')
 *         __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties')             # <<<<<<<<<<<<<<
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')
 *         __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetSparseProperties"));

    /* "cuda/_cuda/ccuda.pyx":3315
 *         __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2')
 *         __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties')
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')             # <<<<<<<<<<<<<<
 *         __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements')
 *         __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayGetSparseProperties"));

    /* "cuda/_cuda/ccuda.pyx":3316
 *         __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties')
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')
 *         __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements')             # <<<<<<<<<<<<<<
 *         __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements')
 *         __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetMemoryRequirements"));

    /* "cuda/_cuda/ccuda.pyx":3317
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')
 *         __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements')
 *         __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements')             # <<<<<<<<<<<<<<
 *         __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane')
 *         __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayGetMemoryRequirements"));

    /* "cuda/_cuda/ccuda.pyx":3318
 *         __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements')
 *         __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements')
 *         __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane')             # <<<<<<<<<<<<<<
 *         __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy')
 *         __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetPlane"));

    /* "cuda/_cuda/ccuda.pyx":3319
 *         __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements')
 *         __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane')
 *         __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy')             # <<<<<<<<<<<<<<
 *         __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2')
 *         __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy = dlsym(__pyx_v_handle, ((char const *)"cuArrayDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3320
 *         __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane')
 *         __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy')
 *         __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2')             # <<<<<<<<<<<<<<
 *         __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2')
 *         __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuArray3DCreate_v2"));

    /* "cuda/_cuda/ccuda.pyx":3321
 *         __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy')
 *         __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2')
 *         __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2')             # <<<<<<<<<<<<<<
 *         __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate')
 *         __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2 = dlsym(__pyx_v_handle, ((char const *)"cuArray3DGetDescriptor_v2"));

    /* "cuda/_cuda/ccuda.pyx":3322
 *         __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2')
 *         __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2')
 *         __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate')             # <<<<<<<<<<<<<<
 *         __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel')
 *         __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayCreate"));

    /* "cuda/_cuda/ccuda.pyx":3323
 *         __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2')
 *         __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate')
 *         __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel')             # <<<<<<<<<<<<<<
 *         __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy')
 *         __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayGetLevel"));

    /* "cuda/_cuda/ccuda.pyx":3324
 *         __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate')
 *         __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel')
 *         __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy')             # <<<<<<<<<<<<<<
 *         __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve')
 *         __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3325
 *         __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel')
 *         __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy')
 *         __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve')             # <<<<<<<<<<<<<<
 *         __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree')
 *         __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve = dlsym(__pyx_v_handle, ((char const *)"cuMemAddressReserve"));

    /* "cuda/_cuda/ccuda.pyx":3326
 *         __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy')
 *         __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve')
 *         __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree')             # <<<<<<<<<<<<<<
 *         __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate')
 *         __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree = dlsym(__pyx_v_handle, ((char const *)"cuMemAddressFree"));

    /* "cuda/_cuda/ccuda.pyx":3327
 *         __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve')
 *         __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree')
 *         __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate')             # <<<<<<<<<<<<<<
 *         __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease')
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemCreate = dlsym(__pyx_v_handle, ((char const *)"cuMemCreate"));

    /* "cuda/_cuda/ccuda.pyx":3328
 *         __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree')
 *         __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate')
 *         __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease')             # <<<<<<<<<<<<<<
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')
 *         __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease = dlsym(__pyx_v_handle, ((char const *)"cuMemRelease"));

    /* "cuda/_cuda/ccuda.pyx":3329
 *         __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate')
 *         __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease')
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')             # <<<<<<<<<<<<<<
 *         __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap')
 *         __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemMap = dlsym(__pyx_v_handle, ((char const *)"cuMemMap"));

    /* "cuda/_cuda/ccuda.pyx":3330
 *         __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease')
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')
 *         __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap')             # <<<<<<<<<<<<<<
 *         __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess')
 *         __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap = dlsym(__pyx_v_handle, ((char const *)"cuMemUnmap"));

    /* "cuda/_cuda/ccuda.pyx":3331
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')
 *         __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap')
 *         __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess')             # <<<<<<<<<<<<<<
 *         __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess')
 *         __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess = dlsym(__pyx_v_handle, ((char const *)"cuMemSetAccess"));

    /* "cuda/_cuda/ccuda.pyx":3332
 *         __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap')
 *         __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess')
 *         __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess')             # <<<<<<<<<<<<<<
 *         __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle')
 *         __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAccess"));

    /* "cuda/_cuda/ccuda.pyx":3333
 *         __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess')
 *         __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess')
 *         __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle')             # <<<<<<<<<<<<<<
 *         __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle')
 *         __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemExportToShareableHandle"));

    /* "cuda/_cuda/ccuda.pyx":3334
 *         __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess')
 *         __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle')
 *         __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle')             # <<<<<<<<<<<<<<
 *         __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity')
 *         __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemImportFromShareableHandle"));

    /* "cuda/_cuda/ccuda.pyx":3335
 *         __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle')
 *         __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle')
 *         __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity')             # <<<<<<<<<<<<<<
 *         __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle')
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAllocationGranularity"));

    /* "cuda/_cuda/ccuda.pyx":3336
 *         __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle')
 *         __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity')
 *         __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle')             # <<<<<<<<<<<<<<
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')
 *         __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAllocationPropertiesFromHandle"));

    /* "cuda/_cuda/ccuda.pyx":3337
 *         __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity')
 *         __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle')
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')             # <<<<<<<<<<<<<<
 *         __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo')
 *         __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemRetainAllocationHandle"));

    /* "cuda/_cuda/ccuda.pyx":3338
 *         __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle')
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')
 *         __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo')             # <<<<<<<<<<<<<<
 *         __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute')
 *         __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolTrimTo"));

    /* "cuda/_cuda/ccuda.pyx":3339
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')
 *         __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo')
 *         __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute')             # <<<<<<<<<<<<<<
 *         __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute')
 *         __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolSetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3340
 *         __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo')
 *         __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute')
 *         __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute')             # <<<<<<<<<<<<<<
 *         __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess')
 *         __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolGetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3341
 *         __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute')
 *         __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute')
 *         __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess')             # <<<<<<<<<<<<<<
 *         __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess')
 *         __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolSetAccess"));

    /* "cuda/_cuda/ccuda.pyx":3342
 *         __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute')
 *         __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess')
 *         __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess')             # <<<<<<<<<<<<<<
 *         __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate')
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolGetAccess"));

    /* "cuda/_cuda/ccuda.pyx":3343
 *         __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess')
 *         __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess')
 *         __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate')             # <<<<<<<<<<<<<<
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')
 *         __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolCreate"));

    /* "cuda/_cuda/ccuda.pyx":3344
 *         __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess')
 *         __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate')
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')             # <<<<<<<<<<<<<<
 *         __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle')
 *         __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3345
 *         __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate')
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')
 *         __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle')             # <<<<<<<<<<<<<<
 *         __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle')
 *         __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolExportToShareableHandle"));

    /* "cuda/_cuda/ccuda.pyx":3346
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')
 *         __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle')
 *         __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle')             # <<<<<<<<<<<<<<
 *         __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer')
 *         __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolImportFromShareableHandle"));

    /* "cuda/_cuda/ccuda.pyx":3347
 *         __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle')
 *         __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle')
 *         __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer')             # <<<<<<<<<<<<<<
 *         __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer')
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolExportPointer"));

    /* "cuda/_cuda/ccuda.pyx":3348
 *         __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle')
 *         __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer')
 *         __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer')             # <<<<<<<<<<<<<<
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')
 *         __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolImportPointer"));

    /* "cuda/_cuda/ccuda.pyx":3349
 *         __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer')
 *         __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer')
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')             # <<<<<<<<<<<<<<
 *         __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise')
 *         __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuPointerGetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3350
 *         __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer')
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')
 *         __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise')             # <<<<<<<<<<<<<<
 *         __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute')
 *         __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise = dlsym(__pyx_v_handle, ((char const *)"cuMemAdvise"));

    /* "cuda/_cuda/ccuda.pyx":3351
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')
 *         __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise')
 *         __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute')             # <<<<<<<<<<<<<<
 *         __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes')
 *         __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuMemRangeGetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3352
 *         __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise')
 *         __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute')
 *         __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes')             # <<<<<<<<<<<<<<
 *         __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute')
 *         __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes = dlsym(__pyx_v_handle, ((char const *)"cuMemRangeGetAttributes"));

    /* "cuda/_cuda/ccuda.pyx":3353
 *         __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute')
 *         __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes')
 *         __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute')             # <<<<<<<<<<<<<<
 *         __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes')
 *         __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuPointerSetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3354
 *         __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes')
 *         __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute')
 *         __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes')             # <<<<<<<<<<<<<<
 *         __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate')
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes = dlsym(__pyx_v_handle, ((char const *)"cuPointerGetAttributes"));

    /* "cuda/_cuda/ccuda.pyx":3355
 *         __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute')
 *         __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes')
 *         __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate')             # <<<<<<<<<<<<<<
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate = dlsym(__pyx_v_handle, ((char const *)"cuStreamCreate"));

    /* "cuda/_cuda/ccuda.pyx":3356
 *         __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes')
 *         __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate')
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')             # <<<<<<<<<<<<<<
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority = dlsym(__pyx_v_handle, ((char const *)"cuStreamCreateWithPriority"));

    /* "cuda/_cuda/ccuda.pyx":3357
 *         __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate')
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')             # <<<<<<<<<<<<<<
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode = dlsym(__pyx_v_handle, ((char const *)"cuThreadExchangeStreamCaptureMode"));

    /* "cuda/_cuda/ccuda.pyx":3358
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')             # <<<<<<<<<<<<<<
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')
 *         __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamDestroy_v2"));

    /* "cuda/_cuda/ccuda.pyx":3359
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')             # <<<<<<<<<<<<<<
 *         __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery')
 *         __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate = dlsym(__pyx_v_handle, ((char const *)"cuEventCreate"));

    /* "cuda/_cuda/ccuda.pyx":3360
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')
 *         __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery')             # <<<<<<<<<<<<<<
 *         __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize')
 *         __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery = dlsym(__pyx_v_handle, ((char const *)"cuEventQuery"));

    /* "cuda/_cuda/ccuda.pyx":3361
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')
 *         __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery')
 *         __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize')             # <<<<<<<<<<<<<<
 *         __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2')
 *         __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuEventSynchronize"));

    /* "cuda/_cuda/ccuda.pyx":3362
 *         __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery')
 *         __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize')
 *         __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2')             # <<<<<<<<<<<<<<
 *         __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime')
 *         __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2 = dlsym(__pyx_v_handle, ((char const *)"cuEventDestroy_v2"));

    /* "cuda/_cuda/ccuda.pyx":3363
 *         __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize')
 *         __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2')
 *         __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime')             # <<<<<<<<<<<<<<
 *         __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory')
 *         __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime = dlsym(__pyx_v_handle, ((char const *)"cuEventElapsedTime"));

    /* "cuda/_cuda/ccuda.pyx":3364
 *         __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2')
 *         __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime')
 *         __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory')             # <<<<<<<<<<<<<<
 *         __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer')
 *         __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory = dlsym(__pyx_v_handle, ((char const *)"cuImportExternalMemory"));

    /* "cuda/_cuda/ccuda.pyx":3365
 *         __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime')
 *         __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory')
 *         __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer')             # <<<<<<<<<<<<<<
 *         __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 *         __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer = dlsym(__pyx_v_handle, ((char const *)"cuExternalMemoryGetMappedBuffer"));

    /* "cuda/_cuda/ccuda.pyx":3366
 *         __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory')
 *         __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer')
 *         __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray')             # <<<<<<<<<<<<<<
 *         __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory')
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray = dlsym(__pyx_v_handle, ((char const *)"cuExternalMemoryGetMappedMipmappedArray"));

    /* "cuda/_cuda/ccuda.pyx":3367
 *         __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer')
 *         __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 *         __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory')             # <<<<<<<<<<<<<<
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory = dlsym(__pyx_v_handle, ((char const *)"cuDestroyExternalMemory"));

    /* "cuda/_cuda/ccuda.pyx":3368
 *         __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 *         __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory')
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')             # <<<<<<<<<<<<<<
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')
 *         __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore = dlsym(__pyx_v_handle, ((char const *)"cuImportExternalSemaphore"));

    /* "cuda/_cuda/ccuda.pyx":3369
 *         __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory')
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')             # <<<<<<<<<<<<<<
 *         __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute')
 *         __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore = dlsym(__pyx_v_handle, ((char const *)"cuDestroyExternalSemaphore"));

    /* "cuda/_cuda/ccuda.pyx":3370
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')
 *         __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute')             # <<<<<<<<<<<<<<
 *         __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute')
 *         __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuFuncGetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3371
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')
 *         __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute')
 *         __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute')             # <<<<<<<<<<<<<<
 *         __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig')
 *         __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3372
 *         __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute')
 *         __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute')
 *         __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig')             # <<<<<<<<<<<<<<
 *         __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig')
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetCacheConfig"));

    /* "cuda/_cuda/ccuda.pyx":3373
 *         __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute')
 *         __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig')
 *         __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetSharedMemConfig"));

    /* "cuda/_cuda/ccuda.pyx":3374
 *         __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig')
 *         __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig')
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')             # <<<<<<<<<<<<<<
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')
 *         __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule = dlsym(__pyx_v_handle, ((char const *)"cuFuncGetModule"));

    /* "cuda/_cuda/ccuda.pyx":3375
 *         __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig')
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')             # <<<<<<<<<<<<<<
 *         __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape')
 *         __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice = dlsym(__pyx_v_handle, ((char const *)"cuLaunchCooperativeKernelMultiDevice"));

    /* "cuda/_cuda/ccuda.pyx":3376
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')
 *         __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape')             # <<<<<<<<<<<<<<
 *         __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize')
 *         __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetBlockShape"));

    /* "cuda/_cuda/ccuda.pyx":3377
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')
 *         __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape')
 *         __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize')             # <<<<<<<<<<<<<<
 *         __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize')
 *         __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetSharedSize"));

    /* "cuda/_cuda/ccuda.pyx":3378
 *         __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape')
 *         __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize')
 *         __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize')             # <<<<<<<<<<<<<<
 *         __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti')
 *         __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize = dlsym(__pyx_v_handle, ((char const *)"cuParamSetSize"));

    /* "cuda/_cuda/ccuda.pyx":3379
 *         __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize')
 *         __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize')
 *         __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti')             # <<<<<<<<<<<<<<
 *         __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf')
 *         __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti = dlsym(__pyx_v_handle, ((char const *)"cuParamSeti"));

    /* "cuda/_cuda/ccuda.pyx":3380
 *         __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize')
 *         __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti')
 *         __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf')             # <<<<<<<<<<<<<<
 *         __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv')
 *         __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf = dlsym(__pyx_v_handle, ((char const *)"cuParamSetf"));

    /* "cuda/_cuda/ccuda.pyx":3381
 *         __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti')
 *         __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf')
 *         __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv')             # <<<<<<<<<<<<<<
 *         __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch')
 *         __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv = dlsym(__pyx_v_handle, ((char const *)"cuParamSetv"));

    /* "cuda/_cuda/ccuda.pyx":3382
 *         __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf')
 *         __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv')
 *         __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch')             # <<<<<<<<<<<<<<
 *         __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid')
 *         __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLaunch = dlsym(__pyx_v_handle, ((char const *)"cuLaunch"));

    /* "cuda/_cuda/ccuda.pyx":3383
 *         __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv')
 *         __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch')
 *         __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid')             # <<<<<<<<<<<<<<
 *         __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync')
 *         __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid = dlsym(__pyx_v_handle, ((char const *)"cuLaunchGrid"));

    /* "cuda/_cuda/ccuda.pyx":3384
 *         __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch')
 *         __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid')
 *         __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync')             # <<<<<<<<<<<<<<
 *         __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef')
 *         __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync = dlsym(__pyx_v_handle, ((char const *)"cuLaunchGridAsync"));

    /* "cuda/_cuda/ccuda.pyx":3385
 *         __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid')
 *         __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync')
 *         __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef')             # <<<<<<<<<<<<<<
 *         __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate')
 *         __cuGraphAddKernelNode = dlfcn.dlsym(handle, 'cuGraphAddKernelNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef = dlsym(__pyx_v_handle, ((char const *)"cuParamSetTexRef"));

    /* "cuda/_cuda/ccuda.pyx":3386
 *         __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync')
 *         __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef')
 *         __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate')             # <<<<<<<<<<<<<<
 *         __cuGraphAddKernelNode = dlfcn.dlsym(handle, 'cuGraphAddKernelNode')
 *         __cuGraphKernelNodeGetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate = dlsym(__pyx_v_handle, ((char const *)"cuGraphCreate"));

    /* "cuda/_cuda/ccuda.pyx":3387
 *         __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef')
 *         __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate')
 *         __cuGraphAddKernelNode = dlfcn.dlsym(handle, 'cuGraphAddKernelNode')             # <<<<<<<<<<<<<<
 *         __cuGraphKernelNodeGetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams')
 *         __cuGraphKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddKernelNode"));

    /* "cuda/_cuda/ccuda.pyx":3388
 *         __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate')
 *         __cuGraphAddKernelNode = dlfcn.dlsym(handle, 'cuGraphAddKernelNode')
 *         __cuGraphKernelNodeGetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams')
 *         __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeGetParams"));

    /* "cuda/_cuda/ccuda.pyx":3389
 *         __cuGraphAddKernelNode = dlfcn.dlsym(handle, 'cuGraphAddKernelNode')
 *         __cuGraphKernelNodeGetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams')
 *         __cuGraphKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode')
 *         __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3390
 *         __cuGraphKernelNodeGetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams')
 *         __cuGraphKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams')
 *         __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode')             # <<<<<<<<<<<<<<
 *         __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams')
 *         __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddMemcpyNode"));

    /* "cuda/_cuda/ccuda.pyx":3391
 *         __cuGraphKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams')
 *         __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode')
 *         __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams')
 *         __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemcpyNodeGetParams"));

    /* "cuda/_cuda/ccuda.pyx":3392
 *         __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode')
 *         __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams')
 *         __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode')
 *         __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemcpyNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3393
 *         __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams')
 *         __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams')
 *         __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode')             # <<<<<<<<<<<<<<
 *         __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams')
 *         __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddMemsetNode"));

    /* "cuda/_cuda/ccuda.pyx":3394
 *         __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams')
 *         __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode')
 *         __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams')
 *         __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemsetNodeGetParams"));

    /* "cuda/_cuda/ccuda.pyx":3395
 *         __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode')
 *         __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams')
 *         __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode')
 *         __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemsetNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3396
 *         __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams')
 *         __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams')
 *         __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode')             # <<<<<<<<<<<<<<
 *         __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams')
 *         __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddHostNode"));

    /* "cuda/_cuda/ccuda.pyx":3397
 *         __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams')
 *         __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode')
 *         __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams')
 *         __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphHostNodeGetParams"));

    /* "cuda/_cuda/ccuda.pyx":3398
 *         __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode')
 *         __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams')
 *         __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode')
 *         __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphHostNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3399
 *         __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams')
 *         __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams')
 *         __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode')             # <<<<<<<<<<<<<<
 *         __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph')
 *         __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddChildGraphNode"));

    /* "cuda/_cuda/ccuda.pyx":3400
 *         __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams')
 *         __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode')
 *         __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph')             # <<<<<<<<<<<<<<
 *         __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode')
 *         __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph = dlsym(__pyx_v_handle, ((char const *)"cuGraphChildGraphNodeGetGraph"));

    /* "cuda/_cuda/ccuda.pyx":3401
 *         __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode')
 *         __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph')
 *         __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode')             # <<<<<<<<<<<<<<
 *         __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode')
 *         __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddEmptyNode"));

    /* "cuda/_cuda/ccuda.pyx":3402
 *         __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph')
 *         __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode')
 *         __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode')             # <<<<<<<<<<<<<<
 *         __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent')
 *         __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddEventRecordNode"));

    /* "cuda/_cuda/ccuda.pyx":3403
 *         __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode')
 *         __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode')
 *         __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent')             # <<<<<<<<<<<<<<
 *         __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent')
 *         __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphEventRecordNodeGetEvent"));

    /* "cuda/_cuda/ccuda.pyx":3404
 *         __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode')
 *         __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent')
 *         __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent')             # <<<<<<<<<<<<<<
 *         __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode')
 *         __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphEventRecordNodeSetEvent"));

    /* "cuda/_cuda/ccuda.pyx":3405
 *         __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent')
 *         __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent')
 *         __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode')             # <<<<<<<<<<<<<<
 *         __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent')
 *         __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddEventWaitNode"));

    /* "cuda/_cuda/ccuda.pyx":3406
 *         __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent')
 *         __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode')
 *         __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent')             # <<<<<<<<<<<<<<
 *         __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent')
 *         __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphEventWaitNodeGetEvent"));

    /* "cuda/_cuda/ccuda.pyx":3407
 *         __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode')
 *         __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent')
 *         __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent')             # <<<<<<<<<<<<<<
 *         __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 *         __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphEventWaitNodeSetEvent"));

    /* "cuda/_cuda/ccuda.pyx":3408
 *         __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent')
 *         __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent')
 *         __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode')             # <<<<<<<<<<<<<<
 *         __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 *         __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddExternalSemaphoresSignalNode"));

    /* "cuda/_cuda/ccuda.pyx":3409
 *         __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent')
 *         __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 *         __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 *         __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExternalSemaphoresSignalNodeGetParams"));

    /* "cuda/_cuda/ccuda.pyx":3410
 *         __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 *         __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 *         __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 *         __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExternalSemaphoresSignalNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3411
 *         __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 *         __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 *         __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode')             # <<<<<<<<<<<<<<
 *         __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 *         __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddExternalSemaphoresWaitNode"));

    /* "cuda/_cuda/ccuda.pyx":3412
 *         __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 *         __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 *         __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExternalSemaphoresWaitNodeGetParams"));

    /* "cuda/_cuda/ccuda.pyx":3413
 *         __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 *         __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 *         __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode')
 *         __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExternalSemaphoresWaitNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3414
 *         __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 *         __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode')             # <<<<<<<<<<<<<<
 *         __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams')
 *         __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddMemAllocNode"));

    /* "cuda/_cuda/ccuda.pyx":3415
 *         __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode')
 *         __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode')
 *         __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemAllocNodeGetParams"));

    /* "cuda/_cuda/ccuda.pyx":3416
 *         __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode')
 *         __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams')
 *         __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode')             # <<<<<<<<<<<<<<
 *         __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams')
 *         __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddMemFreeNode"));

    /* "cuda/_cuda/ccuda.pyx":3417
 *         __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams')
 *         __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode')
 *         __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams')             # <<<<<<<<<<<<<<
 *         __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim')
 *         __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemFreeNodeGetParams"));

    /* "cuda/_cuda/ccuda.pyx":3418
 *         __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode')
 *         __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams')
 *         __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute')
 *         __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGraphMemTrim"));

    /* "cuda/_cuda/ccuda.pyx":3419
 *         __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams')
 *         __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim')
 *         __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute')             # <<<<<<<<<<<<<<
 *         __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute')
 *         __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetGraphMemAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3420
 *         __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim')
 *         __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute')
 *         __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute')             # <<<<<<<<<<<<<<
 *         __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone')
 *         __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute = dlsym(__pyx_v_handle, ((char const *)"cuDeviceSetGraphMemAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3421
 *         __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute')
 *         __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute')
 *         __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone')             # <<<<<<<<<<<<<<
 *         __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone')
 *         __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone = dlsym(__pyx_v_handle, ((char const *)"cuGraphClone"));

    /* "cuda/_cuda/ccuda.pyx":3422
 *         __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute')
 *         __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone')
 *         __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone')             # <<<<<<<<<<<<<<
 *         __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType')
 *         __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeFindInClone"));

    /* "cuda/_cuda/ccuda.pyx":3423
 *         __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone')
 *         __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone')
 *         __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType')             # <<<<<<<<<<<<<<
 *         __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes')
 *         __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetType"));

    /* "cuda/_cuda/ccuda.pyx":3424
 *         __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone')
 *         __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType')
 *         __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes')             # <<<<<<<<<<<<<<
 *         __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes')
 *         __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes = dlsym(__pyx_v_handle, ((char const *)"cuGraphGetNodes"));

    /* "cuda/_cuda/ccuda.pyx":3425
 *         __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType')
 *         __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes')
 *         __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes')             # <<<<<<<<<<<<<<
 *         __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges')
 *         __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes = dlsym(__pyx_v_handle, ((char const *)"cuGraphGetRootNodes"));

    /* "cuda/_cuda/ccuda.pyx":3426
 *         __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes')
 *         __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes')
 *         __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges')             # <<<<<<<<<<<<<<
 *         __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies')
 *         __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges = dlsym(__pyx_v_handle, ((char const *)"cuGraphGetEdges"));

    /* "cuda/_cuda/ccuda.pyx":3427
 *         __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes')
 *         __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges')
 *         __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies')             # <<<<<<<<<<<<<<
 *         __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes')
 *         __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetDependencies"));

    /* "cuda/_cuda/ccuda.pyx":3428
 *         __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges')
 *         __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies')
 *         __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes')             # <<<<<<<<<<<<<<
 *         __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies')
 *         __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetDependentNodes"));

    /* "cuda/_cuda/ccuda.pyx":3429
 *         __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies')
 *         __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes')
 *         __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies')             # <<<<<<<<<<<<<<
 *         __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies')
 *         __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddDependencies"));

    /* "cuda/_cuda/ccuda.pyx":3430
 *         __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes')
 *         __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies')
 *         __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies')             # <<<<<<<<<<<<<<
 *         __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode')
 *         __cuGraphInstantiate_v2 = dlfcn.dlsym(handle, 'cuGraphInstantiate_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies = dlsym(__pyx_v_handle, ((char const *)"cuGraphRemoveDependencies"));

    /* "cuda/_cuda/ccuda.pyx":3431
 *         __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies')
 *         __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies')
 *         __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode')             # <<<<<<<<<<<<<<
 *         __cuGraphInstantiate_v2 = dlfcn.dlsym(handle, 'cuGraphInstantiate_v2')
 *         __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphDestroyNode"));

    /* "cuda/_cuda/ccuda.pyx":3432
 *         __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies')
 *         __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode')
 *         __cuGraphInstantiate_v2 = dlfcn.dlsym(handle, 'cuGraphInstantiate_v2')             # <<<<<<<<<<<<<<
 *         __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags')
 *         __cuGraphExecKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphInstantiate_v2"));

    /* "cuda/_cuda/ccuda.pyx":3433
 *         __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode')
 *         __cuGraphInstantiate_v2 = dlfcn.dlsym(handle, 'cuGraphInstantiate_v2')
 *         __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags')             # <<<<<<<<<<<<<<
 *         __cuGraphExecKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams')
 *         __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuGraphInstantiateWithFlags"));

    /* "cuda/_cuda/ccuda.pyx":3434
 *         __cuGraphInstantiate_v2 = dlfcn.dlsym(handle, 'cuGraphInstantiate_v2')
 *         __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags')
 *         __cuGraphExecKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams')
 *         __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecKernelNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3435
 *         __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags')
 *         __cuGraphExecKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams')
 *         __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams')
 *         __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecMemcpyNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3436
 *         __cuGraphExecKernelNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams')
 *         __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams')
 *         __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams')
 *         __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecMemsetNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3437
 *         __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams')
 *         __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams')
 *         __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams')
 *         __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecHostNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3438
 *         __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams')
 *         __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams')
 *         __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent')
 *         __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecChildGraphNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3439
 *         __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams')
 *         __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams')
 *         __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent')             # <<<<<<<<<<<<<<
 *         __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent')
 *         __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecEventRecordNodeSetEvent"));

    /* "cuda/_cuda/ccuda.pyx":3440
 *         __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams')
 *         __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent')
 *         __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent')             # <<<<<<<<<<<<<<
 *         __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecEventWaitNodeSetEvent"));

    /* "cuda/_cuda/ccuda.pyx":3441
 *         __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent')
 *         __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent')
 *         __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecExternalSemaphoresSignalNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3442
 *         __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent')
 *         __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled')
 *         __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecExternalSemaphoresWaitNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":3443
 *         __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled')             # <<<<<<<<<<<<<<
 *         __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled')
 *         __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeSetEnabled"));

    /* "cuda/_cuda/ccuda.pyx":3444
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled')
 *         __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled')             # <<<<<<<<<<<<<<
 *         __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy')
 *         __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetEnabled"));

    /* "cuda/_cuda/ccuda.pyx":3445
 *         __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled')
 *         __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled')
 *         __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy')             # <<<<<<<<<<<<<<
 *         __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy')
 *         __cuGraphExecUpdate = dlfcn.dlsym(handle, 'cuGraphExecUpdate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3446
 *         __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled')
 *         __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy')
 *         __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy')             # <<<<<<<<<<<<<<
 *         __cuGraphExecUpdate = dlfcn.dlsym(handle, 'cuGraphExecUpdate')
 *         __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy = dlsym(__pyx_v_handle, ((char const *)"cuGraphDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3447
 *         __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy')
 *         __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy')
 *         __cuGraphExecUpdate = dlfcn.dlsym(handle, 'cuGraphExecUpdate')             # <<<<<<<<<<<<<<
 *         __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes')
 *         __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecUpdate"));

    /* "cuda/_cuda/ccuda.pyx":3448
 *         __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy')
 *         __cuGraphExecUpdate = dlfcn.dlsym(handle, 'cuGraphExecUpdate')
 *         __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes')             # <<<<<<<<<<<<<<
 *         __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute')
 *         __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeCopyAttributes"));

    /* "cuda/_cuda/ccuda.pyx":3449
 *         __cuGraphExecUpdate = dlfcn.dlsym(handle, 'cuGraphExecUpdate')
 *         __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes')
 *         __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute')             # <<<<<<<<<<<<<<
 *         __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute')
 *         __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeGetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3450
 *         __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes')
 *         __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute')
 *         __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute')             # <<<<<<<<<<<<<<
 *         __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint')
 *         __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeSetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3451
 *         __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute')
 *         __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute')
 *         __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint')             # <<<<<<<<<<<<<<
 *         __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate')
 *         __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint = dlsym(__pyx_v_handle, ((char const *)"cuGraphDebugDotPrint"));

    /* "cuda/_cuda/ccuda.pyx":3452
 *         __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute')
 *         __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint')
 *         __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate')             # <<<<<<<<<<<<<<
 *         __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain')
 *         __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate = dlsym(__pyx_v_handle, ((char const *)"cuUserObjectCreate"));

    /* "cuda/_cuda/ccuda.pyx":3453
 *         __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint')
 *         __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate')
 *         __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain')             # <<<<<<<<<<<<<<
 *         __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease')
 *         __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain = dlsym(__pyx_v_handle, ((char const *)"cuUserObjectRetain"));

    /* "cuda/_cuda/ccuda.pyx":3454
 *         __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate')
 *         __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain')
 *         __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease')             # <<<<<<<<<<<<<<
 *         __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject')
 *         __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease = dlsym(__pyx_v_handle, ((char const *)"cuUserObjectRelease"));

    /* "cuda/_cuda/ccuda.pyx":3455
 *         __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain')
 *         __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease')
 *         __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject')             # <<<<<<<<<<<<<<
 *         __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject')
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject = dlsym(__pyx_v_handle, ((char const *)"cuGraphRetainUserObject"));

    /* "cuda/_cuda/ccuda.pyx":3456
 *         __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease')
 *         __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject')
 *         __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject')             # <<<<<<<<<<<<<<
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject = dlsym(__pyx_v_handle, ((char const *)"cuGraphReleaseUserObject"));

    /* "cuda/_cuda/ccuda.pyx":3457
 *         __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject')
 *         __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject')
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')             # <<<<<<<<<<<<<<
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')
 *         __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessor"));

    /* "cuda/_cuda/ccuda.pyx":3458
 *         __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject')
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')             # <<<<<<<<<<<<<<
 *         __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize')
 *         __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"));

    /* "cuda/_cuda/ccuda.pyx":3459
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')
 *         __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize')             # <<<<<<<<<<<<<<
 *         __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')
 *         __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxPotentialBlockSize"));

    /* "cuda/_cuda/ccuda.pyx":3460
 *         __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')
 *         __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize')
 *         __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')             # <<<<<<<<<<<<<<
 *         __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')
 *         __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxPotentialBlockSizeWithFlags"));

    /* "cuda/_cuda/ccuda.pyx":3461
 *         __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize')
 *         __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')
 *         __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray')
 *         __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyAvailableDynamicSMemPerBlock"));

    /* "cuda/_cuda/ccuda.pyx":3462
 *         __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')
 *         __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')
 *         __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray')
 *         __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetArray"));

    /* "cuda/_cuda/ccuda.pyx":3463
 *         __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')
 *         __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray')
 *         __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2')
 *         __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMipmappedArray"));

    /* "cuda/_cuda/ccuda.pyx":3464
 *         __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray')
 *         __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray')
 *         __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3')
 *         __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2 = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetAddress_v2"));

    /* "cuda/_cuda/ccuda.pyx":3465
 *         __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray')
 *         __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2')
 *         __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat')
 *         __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3 = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetAddress2D_v3"));

    /* "cuda/_cuda/ccuda.pyx":3466
 *         __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2')
 *         __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3')
 *         __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode')
 *         __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetFormat"));

    /* "cuda/_cuda/ccuda.pyx":3467
 *         __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3')
 *         __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat')
 *         __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode')
 *         __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetAddressMode"));

    /* "cuda/_cuda/ccuda.pyx":3468
 *         __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat')
 *         __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode')
 *         __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode')
 *         __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetFilterMode"));

    /* "cuda/_cuda/ccuda.pyx":3469
 *         __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode')
 *         __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode')
 *         __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias')
 *         __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMipmapFilterMode"));

    /* "cuda/_cuda/ccuda.pyx":3470
 *         __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode')
 *         __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode')
 *         __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp')
 *         __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMipmapLevelBias"));

    /* "cuda/_cuda/ccuda.pyx":3471
 *         __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode')
 *         __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias')
 *         __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy')
 *         __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMipmapLevelClamp"));

    /* "cuda/_cuda/ccuda.pyx":3472
 *         __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias')
 *         __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp')
 *         __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor')
 *         __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMaxAnisotropy"));

    /* "cuda/_cuda/ccuda.pyx":3473
 *         __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp')
 *         __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy')
 *         __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor')             # <<<<<<<<<<<<<<
 *         __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags')
 *         __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetBorderColor"));

    /* "cuda/_cuda/ccuda.pyx":3474
 *         __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy')
 *         __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor')
 *         __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2')
 *         __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetFlags"));

    /* "cuda/_cuda/ccuda.pyx":3475
 *         __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor')
 *         __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags')
 *         __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray')
 *         __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2 = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetAddress_v2"));

    /* "cuda/_cuda/ccuda.pyx":3476
 *         __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags')
 *         __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2')
 *         __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray')
 *         __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetArray"));

    /* "cuda/_cuda/ccuda.pyx":3477
 *         __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2')
 *         __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray')
 *         __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode')
 *         __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMipmappedArray"));

    /* "cuda/_cuda/ccuda.pyx":3478
 *         __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray')
 *         __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray')
 *         __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode')
 *         __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetAddressMode"));

    /* "cuda/_cuda/ccuda.pyx":3479
 *         __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray')
 *         __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode')
 *         __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat')
 *         __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetFilterMode"));

    /* "cuda/_cuda/ccuda.pyx":3480
 *         __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode')
 *         __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode')
 *         __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode')
 *         __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetFormat"));

    /* "cuda/_cuda/ccuda.pyx":3481
 *         __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode')
 *         __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat')
 *         __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias')
 *         __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMipmapFilterMode"));

    /* "cuda/_cuda/ccuda.pyx":3482
 *         __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat')
 *         __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode')
 *         __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp')
 *         __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMipmapLevelBias"));

    /* "cuda/_cuda/ccuda.pyx":3483
 *         __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode')
 *         __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias')
 *         __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy')
 *         __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMipmapLevelClamp"));

    /* "cuda/_cuda/ccuda.pyx":3484
 *         __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias')
 *         __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp')
 *         __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor')
 *         __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMaxAnisotropy"));

    /* "cuda/_cuda/ccuda.pyx":3485
 *         __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp')
 *         __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy')
 *         __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor')             # <<<<<<<<<<<<<<
 *         __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags')
 *         __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetBorderColor"));

    /* "cuda/_cuda/ccuda.pyx":3486
 *         __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy')
 *         __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor')
 *         __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags')             # <<<<<<<<<<<<<<
 *         __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate')
 *         __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetFlags"));

    /* "cuda/_cuda/ccuda.pyx":3487
 *         __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor')
 *         __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags')
 *         __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate')             # <<<<<<<<<<<<<<
 *         __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy')
 *         __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate = dlsym(__pyx_v_handle, ((char const *)"cuTexRefCreate"));

    /* "cuda/_cuda/ccuda.pyx":3488
 *         __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags')
 *         __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate')
 *         __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy')             # <<<<<<<<<<<<<<
 *         __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray')
 *         __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy = dlsym(__pyx_v_handle, ((char const *)"cuTexRefDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3489
 *         __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate')
 *         __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy')
 *         __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray')             # <<<<<<<<<<<<<<
 *         __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray')
 *         __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray = dlsym(__pyx_v_handle, ((char const *)"cuSurfRefSetArray"));

    /* "cuda/_cuda/ccuda.pyx":3490
 *         __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy')
 *         __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray')
 *         __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray')             # <<<<<<<<<<<<<<
 *         __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate')
 *         __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray = dlsym(__pyx_v_handle, ((char const *)"cuSurfRefGetArray"));

    /* "cuda/_cuda/ccuda.pyx":3491
 *         __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray')
 *         __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray')
 *         __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate')             # <<<<<<<<<<<<<<
 *         __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy')
 *         __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectCreate"));

    /* "cuda/_cuda/ccuda.pyx":3492
 *         __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray')
 *         __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate')
 *         __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy')             # <<<<<<<<<<<<<<
 *         __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc')
 *         __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3493
 *         __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate')
 *         __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy')
 *         __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc')             # <<<<<<<<<<<<<<
 *         __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc')
 *         __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectGetResourceDesc"));

    /* "cuda/_cuda/ccuda.pyx":3494
 *         __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy')
 *         __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc')
 *         __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc')             # <<<<<<<<<<<<<<
 *         __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc')
 *         __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectGetTextureDesc"));

    /* "cuda/_cuda/ccuda.pyx":3495
 *         __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc')
 *         __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc')
 *         __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc')             # <<<<<<<<<<<<<<
 *         __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate')
 *         __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectGetResourceViewDesc"));

    /* "cuda/_cuda/ccuda.pyx":3496
 *         __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc')
 *         __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc')
 *         __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate')             # <<<<<<<<<<<<<<
 *         __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy')
 *         __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate = dlsym(__pyx_v_handle, ((char const *)"cuSurfObjectCreate"));

    /* "cuda/_cuda/ccuda.pyx":3497
 *         __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc')
 *         __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate')
 *         __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy')             # <<<<<<<<<<<<<<
 *         __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc')
 *         __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy = dlsym(__pyx_v_handle, ((char const *)"cuSurfObjectDestroy"));

    /* "cuda/_cuda/ccuda.pyx":3498
 *         __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate')
 *         __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy')
 *         __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc')             # <<<<<<<<<<<<<<
 *         __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer')
 *         __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc = dlsym(__pyx_v_handle, ((char const *)"cuSurfObjectGetResourceDesc"));

    /* "cuda/_cuda/ccuda.pyx":3499
 *         __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy')
 *         __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc')
 *         __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer')             # <<<<<<<<<<<<<<
 *         __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess')
 *         __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer = dlsym(__pyx_v_handle, ((char const *)"cuDeviceCanAccessPeer"));

    /* "cuda/_cuda/ccuda.pyx":3500
 *         __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc')
 *         __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer')
 *         __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess')             # <<<<<<<<<<<<<<
 *         __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess')
 *         __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess = dlsym(__pyx_v_handle, ((char const *)"cuCtxEnablePeerAccess"));

    /* "cuda/_cuda/ccuda.pyx":3501
 *         __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer')
 *         __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess')
 *         __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess')             # <<<<<<<<<<<<<<
 *         __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute')
 *         __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess = dlsym(__pyx_v_handle, ((char const *)"cuCtxDisablePeerAccess"));

    /* "cuda/_cuda/ccuda.pyx":3502
 *         __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess')
 *         __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess')
 *         __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute')             # <<<<<<<<<<<<<<
 *         __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource')
 *         __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetP2PAttribute"));

    /* "cuda/_cuda/ccuda.pyx":3503
 *         __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess')
 *         __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute')
 *         __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource')             # <<<<<<<<<<<<<<
 *         __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray')
 *         __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsUnregisterResource"));

    /* "cuda/_cuda/ccuda.pyx":3504
 *         __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute')
 *         __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource')
 *         __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray')             # <<<<<<<<<<<<<<
 *         __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 *         __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsSubResourceGetMappedArray"));

    /* "cuda/_cuda/ccuda.pyx":3505
 *         __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource')
 *         __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray')
 *         __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray')             # <<<<<<<<<<<<<<
 *         __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceGetMappedMipmappedArray"));

    /* "cuda/_cuda/ccuda.pyx":3506
 *         __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray')
 *         __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 *         __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2')             # <<<<<<<<<<<<<<
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceGetMappedPointer_v2"));

    /* "cuda/_cuda/ccuda.pyx":3507
 *         __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 *         __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')             # <<<<<<<<<<<<<<
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceSetMapFlags_v2"));

    /* "cuda/_cuda/ccuda.pyx":3508
 *         __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')             # <<<<<<<<<<<<<<
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')
 *         __cuProfilerInitialize = dlfcn.dlsym(handle, 'cuProfilerInitialize')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress = dlsym(__pyx_v_handle, ((char const *)"cuGetProcAddress"));

    /* "cuda/_cuda/ccuda.pyx":3509
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')             # <<<<<<<<<<<<<<
 *         __cuProfilerInitialize = dlfcn.dlsym(handle, 'cuProfilerInitialize')
 *         __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable = dlsym(__pyx_v_handle, ((char const *)"cuGetExportTable"));

    /* "cuda/_cuda/ccuda.pyx":3510
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')
 *         __cuProfilerInitialize = dlfcn.dlsym(handle, 'cuProfilerInitialize')             # <<<<<<<<<<<<<<
 *         __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart')
 *         __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerInitialize = dlsym(__pyx_v_handle, ((char const *)"cuProfilerInitialize"));

    /* "cuda/_cuda/ccuda.pyx":3511
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')
 *         __cuProfilerInitialize = dlfcn.dlsym(handle, 'cuProfilerInitialize')
 *         __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart')             # <<<<<<<<<<<<<<
 *         __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop')
 *         __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart = dlsym(__pyx_v_handle, ((char const *)"cuProfilerStart"));

    /* "cuda/_cuda/ccuda.pyx":3512
 *         __cuProfilerInitialize = dlfcn.dlsym(handle, 'cuProfilerInitialize')
 *         __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart')
 *         __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop')             # <<<<<<<<<<<<<<
 *         __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice')
 *         __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop = dlsym(__pyx_v_handle, ((char const *)"cuProfilerStop"));

    /* "cuda/_cuda/ccuda.pyx":3513
 *         __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart')
 *         __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop')
 *         __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice')             # <<<<<<<<<<<<<<
 *         __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2')
 *         __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUGetDevice = dlsym(__pyx_v_handle, ((char const *)"cuVDPAUGetDevice"));

    /* "cuda/_cuda/ccuda.pyx":3514
 *         __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop')
 *         __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice')
 *         __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2')             # <<<<<<<<<<<<<<
 *         __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 *         __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUCtxCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuVDPAUCtxCreate_v2"));

    /* "cuda/_cuda/ccuda.pyx":3515
 *         __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice')
 *         __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2')
 *         __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface')             # <<<<<<<<<<<<<<
 *         __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 *         __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsVDPAURegisterVideoSurface"));

    /* "cuda/_cuda/ccuda.pyx":3516
 *         __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2')
 *         __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 *         __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface')             # <<<<<<<<<<<<<<
 *         __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage')
 *         __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsVDPAURegisterOutputSurface"));

    /* "cuda/_cuda/ccuda.pyx":3517
 *         __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 *         __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 *         __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect')
 *         __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsEGLRegisterImage = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsEGLRegisterImage"));

    /* "cuda/_cuda/ccuda.pyx":3518
 *         __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 *         __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage')
 *         __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags')
 *         __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnect = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerConnect"));

    /* "cuda/_cuda/ccuda.pyx":3519
 *         __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage')
 *         __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect')
 *         __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect')
 *         __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnectWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerConnectWithFlags"));

    /* "cuda/_cuda/ccuda.pyx":3520
 *         __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect')
 *         __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags')
 *         __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame')
 *         __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerDisconnect"));

    /* "cuda/_cuda/ccuda.pyx":3521
 *         __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags')
 *         __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect')
 *         __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame')
 *         __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerAcquireFrame = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerAcquireFrame"));

    /* "cuda/_cuda/ccuda.pyx":3522
 *         __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect')
 *         __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame')
 *         __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect')
 *         __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerReleaseFrame"));

    /* "cuda/_cuda/ccuda.pyx":3523
 *         __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame')
 *         __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame')
 *         __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect')
 *         __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerConnect = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamProducerConnect"));

    /* "cuda/_cuda/ccuda.pyx":3524
 *         __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame')
 *         __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect')
 *         __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame')
 *         __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamProducerDisconnect"));

    /* "cuda/_cuda/ccuda.pyx":3525
 *         __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect')
 *         __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect')
 *         __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame')             # <<<<<<<<<<<<<<
 *         __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame')
 *         __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamProducerPresentFrame"));

    /* "cuda/_cuda/ccuda.pyx":3526
 *         __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect')
 *         __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame')
 *         __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame')             # <<<<<<<<<<<<<<
 *         __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame')
 *         __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamProducerReturnFrame"));

    /* "cuda/_cuda/ccuda.pyx":3527
 *         __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame')
 *         __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame')
 *         __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame')             # <<<<<<<<<<<<<<
 *         __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync')
 *         __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedEglFrame = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceGetMappedEglFrame"));

    /* "cuda/_cuda/ccuda.pyx":3528
 *         __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame')
 *         __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame')
 *         __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync')             # <<<<<<<<<<<<<<
 *         __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer')
 *         __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventCreateFromEGLSync = dlsym(__pyx_v_handle, ((char const *)"cuEventCreateFromEGLSync"));

    /* "cuda/_cuda/ccuda.pyx":3529
 *         __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame')
 *         __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync')
 *         __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer')             # <<<<<<<<<<<<<<
 *         __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage')
 *         __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterBuffer = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsGLRegisterBuffer"));

    /* "cuda/_cuda/ccuda.pyx":3530
 *         __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync')
 *         __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer')
 *         __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage')             # <<<<<<<<<<<<<<
 *         __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2')
 * 
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsGLRegisterImage"));

    /* "cuda/_cuda/ccuda.pyx":3531
 *         __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer')
 *         __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage')
 *         __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2')             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGLGetDevices_v2"));
  }

  /* "cuda/_cuda/ccuda.pyx":396
 * 
 * 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":395
 * 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_AddTraceback("cuda._cuda.ccuda.cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3533
 *         __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2')
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGetErrorString
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorString(__pyx_t_4cuda_5ccuda_CUresult __pyx_v_error, char const **__pyx_v_pStr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3533, 1, __PYX_ERR(0, 3533, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3534
 * 
 * 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":3535
 * 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, 3535, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3539
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUresult, char const **))__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString)(__pyx_v_error, __pyx_v_pStr);

    /* "cuda/_cuda/ccuda.pyx":3540
 *             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":3534
 * 
 * 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":3533
 *         __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2')
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGetErrorString
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3542
 *     return err
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGetErrorName
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorName(__pyx_t_4cuda_5ccuda_CUresult __pyx_v_error, char const **__pyx_v_pStr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3542, 1, __PYX_ERR(0, 3542, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3543
 * 
 * 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":3544
 * 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, 3544, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3548
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUresult, char const **))__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName)(__pyx_v_error, __pyx_v_pStr);

    /* "cuda/_cuda/ccuda.pyx":3549
 *             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":3543
 * 
 * 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":3542
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3551
 *     return err
 * 
 * cdef CUresult _cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuInit
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuInit(unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3551, 1, __PYX_ERR(0, 3551, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3553
 * 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, 3553, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3557
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuInit)(__pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":3558
 *             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":3552
 * 
 * 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":3551
 *     return err
 * 
 * cdef CUresult _cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuInit
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3560
 *     return err
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDriverGetVersion
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDriverGetVersion(int *__pyx_v_driverVersion) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3560, 1, __PYX_ERR(0, 3560, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3562
 * 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, 3562, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3566
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *))__pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion)(__pyx_v_driverVersion);

    /* "cuda/_cuda/ccuda.pyx":3567
 *             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":3561
 * 
 * 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":3560
 *     return err
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDriverGetVersion
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3569
 *     return err
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGet
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet(__pyx_t_4cuda_5ccuda_CUdevice *__pyx_v_device, int __pyx_v_ordinal) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3569, 1, __PYX_ERR(0, 3569, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3571
 * 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, 3571, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3575
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice *, int))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet)(__pyx_v_device, __pyx_v_ordinal);

    /* "cuda/_cuda/ccuda.pyx":3576
 *             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":3570
 * 
 * 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":3569
 *     return err
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGet
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3578
 *     return err
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetCount
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount(int *__pyx_v_count) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3578, 1, __PYX_ERR(0, 3578, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3580
 * 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, 3580, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3584
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount)(__pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":3585
 *             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":3579
 * 
 * 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":3578
 *     return err
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetCount
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3587
 *     return err
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetName
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName(char *__pyx_v_name, int __pyx_v_length, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3587, 1, __PYX_ERR(0, 3587, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3588
 * 
 * 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":3589
 * 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, 3589, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3593
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(char *, int, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName)(__pyx_v_name, __pyx_v_length, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3594
 *             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":3588
 * 
 * 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":3587
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3596
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetUuid
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid(__pyx_t_4cuda_5ccuda_CUuuid *__pyx_v_uuid, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3596, 1, __PYX_ERR(0, 3596, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3598
 * 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, 3598, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3602
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUuuid *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid)(__pyx_v_uuid, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3603
 *             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":3597
 * 
 * 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":3596
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetUuid
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3605
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetUuid_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid_v2(__pyx_t_4cuda_5ccuda_CUuuid *__pyx_v_uuid, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3605, 1, __PYX_ERR(0, 3605, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3606
 * 
 * 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":3607
 * 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, 3607, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3611
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUuuid *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2)(__pyx_v_uuid, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3612
 *             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":3606
 * 
 * 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":3605
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3614
 *     return err
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetLuid
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetLuid(char *__pyx_v_luid, unsigned int *__pyx_v_deviceNodeMask, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3614, 1, __PYX_ERR(0, 3614, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3615
 * 
 * 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":3616
 * 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, 3616, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3620
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(char *, unsigned int *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid)(__pyx_v_luid, __pyx_v_deviceNodeMask, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3621
 *             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":3615
 * 
 * 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":3614
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3623
 *     return err
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceTotalMem_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2(size_t *__pyx_v_numbytes, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3623, 1, __PYX_ERR(0, 3623, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3624
 * 
 * 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":3625
 * 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, 3625, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3629
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(size_t *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2)(__pyx_v_numbytes, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3630
 *             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":3624
 * 
 * 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":3623
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3632
 *     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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetTexture1DLinearMaxWidth(size_t *__pyx_v_maxWidthInElements, __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_pformat, unsigned int __pyx_v_numChannels, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3632, 1, __PYX_ERR(0, 3632, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3633
 * 
 * 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":3634
 * 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, 3634, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3638
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(size_t *, __pyx_t_4cuda_5ccuda_CUarray_format, unsigned int, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth)(__pyx_v_maxWidthInElements, __pyx_v_pformat, __pyx_v_numChannels, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3639
 *             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":3633
 * 
 * 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":3632
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3641
 *     return err
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute(int *__pyx_v_pi, __pyx_t_4cuda_5ccuda_CUdevice_attribute __pyx_v_attrib, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3641, 1, __PYX_ERR(0, 3641, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3642
 * 
 * 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":3643
 * 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, 3643, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3647
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, __pyx_t_4cuda_5ccuda_CUdevice_attribute, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute)(__pyx_v_pi, __pyx_v_attrib, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3648
 *             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":3642
 * 
 * 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":3641
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3650
 *     return err
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetNvSciSyncAttributes
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetNvSciSyncAttributes(void *__pyx_v_nvSciSyncAttrList, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev, int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3650, 1, __PYX_ERR(0, 3650, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3651
 * 
 * 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":3652
 * 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, 3652, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3656
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, __pyx_t_4cuda_5ccuda_CUdevice, int))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes)(__pyx_v_nvSciSyncAttrList, __pyx_v_dev, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":3657
 *             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":3651
 * 
 * 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":3650
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3659
 *     return err
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceSetMemPool
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetMemPool(__pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev, __pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3659, 1, __PYX_ERR(0, 3659, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3661
 * 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, 3661, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3665
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUmemoryPool))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool)(__pyx_v_dev, __pyx_v_pool);

    /* "cuda/_cuda/ccuda.pyx":3666
 *             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":3660
 * 
 * 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":3659
 *     return err
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceSetMemPool
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3668
 *     return err
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetMemPool
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetMemPool(__pyx_t_4cuda_5ccuda_CUmemoryPool *__pyx_v_pool, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3668, 1, __PYX_ERR(0, 3668, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3670
 * 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, 3670, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3674
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool)(__pyx_v_pool, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3675
 *             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":3669
 * 
 * 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":3668
 *     return err
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetMemPool
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3677
 *     return err
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetDefaultMemPool
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDefaultMemPool(__pyx_t_4cuda_5ccuda_CUmemoryPool *__pyx_v_pool_out, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3677, 1, __PYX_ERR(0, 3677, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3678
 * 
 * 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":3679
 * 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, 3679, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3683
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool)(__pyx_v_pool_out, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3684
 *             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":3678
 * 
 * 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":3677
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3686
 *     return err
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFlushGPUDirectRDMAWrites
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFlushGPUDirectRDMAWrites(__pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget __pyx_v_target, __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope __pyx_v_scope) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3686, 1, __PYX_ERR(0, 3686, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3688
 * 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, 3688, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3689
 *     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":3690
 *     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":3691
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3691, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3691, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3692
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget, __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope))__pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites)(__pyx_v_target, __pyx_v_scope);

    /* "cuda/_cuda/ccuda.pyx":3693
 *             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":3687
 * 
 * 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":3686
 *     return err
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFlushGPUDirectRDMAWrites
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3695
 *     return err
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetProperties
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetProperties(__pyx_t_4cuda_5ccuda_CUdevprop *__pyx_v_prop, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3695, 1, __PYX_ERR(0, 3695, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3697
 * 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, 3697, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3698
 *     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":3699
 *     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":3700
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3700, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3700, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3701
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevprop *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties)(__pyx_v_prop, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3702
 *             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":3696
 * 
 * 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":3695
 *     return err
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetProperties
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3704
 *     return err
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceComputeCapability
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceComputeCapability(int *__pyx_v_major, int *__pyx_v_minor, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3704, 1, __PYX_ERR(0, 3704, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3705
 * 
 * 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":3706
 * 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, 3706, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3707
 *     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":3708
 *     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":3709
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3709, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3709, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3710
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, int *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability)(__pyx_v_major, __pyx_v_minor, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3711
 *             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":3705
 * 
 * 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":3704
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3713
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxRetain
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain(__pyx_t_4cuda_5ccuda_CUcontext *__pyx_v_pctx, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3713, 1, __PYX_ERR(0, 3713, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3715
 * 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, 3715, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3716
 *     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":3717
 *     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":3718
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3718, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3718, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3719
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext *, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain)(__pyx_v_pctx, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3720
 *             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":3714
 * 
 * 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":3713
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxRetain
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3722
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxRelease_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRelease_v2(__pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3722, 1, __PYX_ERR(0, 3722, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3723
 * 
 * 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":3724
 * 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, 3724, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3725
 *     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":3726
 *     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":3727
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3727, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3727, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3728
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2)(__pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3729
 *             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":3723
 * 
 * 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":3722
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxRelease_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3731
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxSetFlags_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxSetFlags_v2(__pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3731, 1, __PYX_ERR(0, 3731, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3732
 * 
 * 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":3733
 * 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, 3733, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3734
 *     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":3735
 *     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":3736
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3736, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3736, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3737
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2)(__pyx_v_dev, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":3738
 *             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":3732
 * 
 * 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":3731
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3740
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxGetState
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxGetState(__pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev, unsigned int *__pyx_v_flags, int *__pyx_v_active) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3740, 1, __PYX_ERR(0, 3740, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3741
 * 
 * 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":3742
 * 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, 3742, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3743
 *     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":3744
 *     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":3745
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3745, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3745, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3746
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice, unsigned int *, int *))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState)(__pyx_v_dev, __pyx_v_flags, __pyx_v_active);

    /* "cuda/_cuda/ccuda.pyx":3747
 *             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":3741
 * 
 * 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":3740
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3749
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxReset_v2(__pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3749, 1, __PYX_ERR(0, 3749, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3750
 * 
 * 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":3751
 * 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, 3751, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3752
 *     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":3753
 *     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":3754
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 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 __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":3752
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3755
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2)(__pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3756
 *             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":3750
 * 
 * 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":3749
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetExecAffinitySupport
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport(int *__pyx_v_pi, __pyx_t_4cuda_5ccuda_CUexecAffinityType __pyx_v_typename, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3758, 1, __PYX_ERR(0, 3758, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3759
 * 
 * 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":3760
 * 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, 3760, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3764
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, __pyx_t_4cuda_5ccuda_CUexecAffinityType, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport)(__pyx_v_pi, __pyx_v_typename, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3765
 *             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":3759
 * 
 * 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":3758
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxCreate_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v2(__pyx_t_4cuda_5ccuda_CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3767, 1, __PYX_ERR(0, 3767, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3768
 * 
 * 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":3769
 * 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, 3769, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3773
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext *, unsigned int, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2)(__pyx_v_pctx, __pyx_v_flags, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":3774
 *             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":3768
 * 
 * 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":3767
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxCreate_v3
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v3(__pyx_t_4cuda_5ccuda_CUcontext *__pyx_v_pctx, __pyx_t_4cuda_5ccuda_CUexecAffinityParam *__pyx_v_paramsArray, int __pyx_v_numParams, unsigned int __pyx_v_flags, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3776, 1, __PYX_ERR(0, 3776, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3777
 * 
 * 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":3778
 * 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, 3778, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3782
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext *, __pyx_t_4cuda_5ccuda_CUexecAffinityParam *, int, unsigned int, __pyx_t_4cuda_5ccuda_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":3783
 *             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":3777
 * 
 * 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":3776
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxDestroy_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxDestroy_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDestroy_v2(__pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3785, 1, __PYX_ERR(0, 3785, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3786
 * 
 * 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":3787
 * 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, 3787, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3791
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2)(__pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":3792
 *             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":3786
 * 
 * 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":3785
 *     return err
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxDestroy_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxPushCurrent_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxPushCurrent_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxPushCurrent_v2(__pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3794, 1, __PYX_ERR(0, 3794, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3795
 * 
 * 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":3796
 * 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, 3796, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3800
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2)(__pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":3801
 *             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":3795
 * 
 * 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":3794
 *     return err
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxPushCurrent_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxPopCurrent_v2(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxPopCurrent_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxPopCurrent_v2(__pyx_t_4cuda_5ccuda_CUcontext *__pyx_v_pctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3803, 1, __PYX_ERR(0, 3803, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3804
 * 
 * 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":3805
 * 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, 3805, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3809
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2)(__pyx_v_pctx);

    /* "cuda/_cuda/ccuda.pyx":3810
 *             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":3804
 * 
 * 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":3803
 *     return err
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxPopCurrent_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetCurrent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent(__pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3812, 1, __PYX_ERR(0, 3812, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3814
 * 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, 3814, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3818
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent)(__pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":3819
 *             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":3813
 * 
 * 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":3812
 *     return err
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetCurrent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetCurrent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent(__pyx_t_4cuda_5ccuda_CUcontext *__pyx_v_pctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3821, 1, __PYX_ERR(0, 3821, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3823
 * 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, 3823, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3827
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent)(__pyx_v_pctx);

    /* "cuda/_cuda/ccuda.pyx":3828
 *             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":3822
 * 
 * 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":3821
 *     return err
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetCurrent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetDevice
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevice(__pyx_t_4cuda_5ccuda_CUdevice *__pyx_v_device) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3830, 1, __PYX_ERR(0, 3830, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3832
 * 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, 3832, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3836
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice)(__pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":3837
 *             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":3831
 * 
 * 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":3830
 *     return err
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetDevice
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetFlags(unsigned int *__pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3839, 1, __PYX_ERR(0, 3839, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3841
 * 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, 3841, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3845
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags)(__pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":3846
 *             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":3840
 * 
 * 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":3839
 *     return err
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSynchronize
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSynchronize(void) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3848, 1, __PYX_ERR(0, 3848, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3850
 * 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, 3850, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3854
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize)();

    /* "cuda/_cuda/ccuda.pyx":3855
 *             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":3849
 * 
 * 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":3848
 *     return err
 * 
 * cdef CUresult _cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSynchronize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetLimit
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetLimit(__pyx_t_4cuda_5ccuda_CUlimit __pyx_v_limit, size_t __pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3857, 1, __PYX_ERR(0, 3857, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3858
 * 
 * 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":3859
 * 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, 3859, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3863
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUlimit, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit)(__pyx_v_limit, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":3864
 *             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":3858
 * 
 * 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":3857
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetLimit
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetLimit(size_t *__pyx_v_pvalue, __pyx_t_4cuda_5ccuda_CUlimit __pyx_v_limit) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3866, 1, __PYX_ERR(0, 3866, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3867
 * 
 * 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":3868
 * 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, 3868, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3872
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(size_t *, __pyx_t_4cuda_5ccuda_CUlimit))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit)(__pyx_v_pvalue, __pyx_v_limit);

    /* "cuda/_cuda/ccuda.pyx":3873
 *             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":3867
 * 
 * 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":3866
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetCacheConfig
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCacheConfig(__pyx_t_4cuda_5ccuda_CUfunc_cache *__pyx_v_pconfig) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3875, 1, __PYX_ERR(0, 3875, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3877
 * 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, 3877, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3881
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunc_cache *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig)(__pyx_v_pconfig);

    /* "cuda/_cuda/ccuda.pyx":3882
 *             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":3876
 * 
 * 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":3875
 *     return err
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetCacheConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetCacheConfig
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCacheConfig(__pyx_t_4cuda_5ccuda_CUfunc_cache __pyx_v_config) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3884, 1, __PYX_ERR(0, 3884, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3886
 * 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, 3886, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3890
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunc_cache))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig)(__pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":3891
 *             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":3885
 * 
 * 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":3884
 *     return err
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetCacheConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetSharedMemConfig
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetSharedMemConfig(__pyx_t_4cuda_5ccuda_CUsharedconfig *__pyx_v_pConfig) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3893, 1, __PYX_ERR(0, 3893, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3895
 * 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, 3895, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3899
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUsharedconfig *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig)(__pyx_v_pConfig);

    /* "cuda/_cuda/ccuda.pyx":3900
 *             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":3894
 * 
 * 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":3893
 *     return err
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetSharedMemConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetSharedMemConfig
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig(__pyx_t_4cuda_5ccuda_CUsharedconfig __pyx_v_config) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3902, 1, __PYX_ERR(0, 3902, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3904
 * 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, 3904, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3908
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUsharedconfig))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig)(__pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":3909
 *             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":3903
 * 
 * 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":3902
 *     return err
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetSharedMemConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetApiVersion
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetApiVersion(__pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx, unsigned int *__pyx_v_version) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3911, 1, __PYX_ERR(0, 3911, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3912
 * 
 * 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":3913
 * 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, 3913, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3917
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext, unsigned int *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion)(__pyx_v_ctx, __pyx_v_version);

    /* "cuda/_cuda/ccuda.pyx":3918
 *             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":3912
 * 
 * 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":3911
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetStreamPriorityRange
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetStreamPriorityRange(int *__pyx_v_leastPriority, int *__pyx_v_greatestPriority) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3920, 1, __PYX_ERR(0, 3920, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3922
 * 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, 3922, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3926
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, int *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange)(__pyx_v_leastPriority, __pyx_v_greatestPriority);

    /* "cuda/_cuda/ccuda.pyx":3927
 *             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":3921
 * 
 * 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":3920
 *     return err
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetStreamPriorityRange
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxResetPersistingL2Cache
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxResetPersistingL2Cache(void) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3929, 1, __PYX_ERR(0, 3929, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3931
 * 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, 3931, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3935
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache)();

    /* "cuda/_cuda/ccuda.pyx":3936
 *             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":3930
 * 
 * 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":3929
 *     return err
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxResetPersistingL2Cache
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetExecAffinity
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetExecAffinity(__pyx_t_4cuda_5ccuda_CUexecAffinityParam *__pyx_v_pExecAffinity, __pyx_t_4cuda_5ccuda_CUexecAffinityType __pyx_v_typename) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3938, 1, __PYX_ERR(0, 3938, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3940
 * 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, 3940, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3944
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUexecAffinityParam *, __pyx_t_4cuda_5ccuda_CUexecAffinityType))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity)(__pyx_v_pExecAffinity, __pyx_v_typename);

    /* "cuda/_cuda/ccuda.pyx":3945
 *             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":3939
 * 
 * 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":3938
 *     return err
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetExecAffinity
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxAttach
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxAttach(__pyx_t_4cuda_5ccuda_CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3947, 1, __PYX_ERR(0, 3947, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3948
 * 
 * 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":3949
 * 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, 3949, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3953
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach)(__pyx_v_pctx, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":3954
 *             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":3948
 * 
 * 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":3947
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxDetach
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDetach(__pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3956, 1, __PYX_ERR(0, 3956, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3958
 * 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, 3958, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3962
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach)(__pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":3963
 *             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":3957
 * 
 * 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":3956
 *     return err
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxDetach
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoad
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoad(__pyx_t_4cuda_5ccuda_CUmodule *__pyx_v_module, char const *__pyx_v_fname) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3965, 1, __PYX_ERR(0, 3965, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3966
 * 
 * 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":3967
 * 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, 3967, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3971
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmodule *, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad)(__pyx_v_module, __pyx_v_fname);

    /* "cuda/_cuda/ccuda.pyx":3972
 *             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":3966
 * 
 * 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":3965
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadData
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadData(__pyx_t_4cuda_5ccuda_CUmodule *__pyx_v_module, void const *__pyx_v_image) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3974, 1, __PYX_ERR(0, 3974, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3975
 * 
 * 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":3976
 * 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, 3976, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3980
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmodule *, void const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData)(__pyx_v_module, __pyx_v_image);

    /* "cuda/_cuda/ccuda.pyx":3981
 *             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":3975
 * 
 * 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":3974
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadDataEx
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadDataEx(__pyx_t_4cuda_5ccuda_CUmodule *__pyx_v_module, void const *__pyx_v_image, unsigned int __pyx_v_numOptions, __pyx_t_4cuda_5ccuda_CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3983, 1, __PYX_ERR(0, 3983, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3984
 * 
 * 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":3985
 * 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, 3985, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3989
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmodule *, void const *, unsigned int, __pyx_t_4cuda_5ccuda_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":3990
 *             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":3984
 * 
 * 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":3983
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadFatBinary
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadFatBinary(__pyx_t_4cuda_5ccuda_CUmodule *__pyx_v_module, void const *__pyx_v_fatCubin) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 3992, 1, __PYX_ERR(0, 3992, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3993
 * 
 * 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":3994
 * 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, 3994, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":3998
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmodule *, void const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary)(__pyx_v_module, __pyx_v_fatCubin);

    /* "cuda/_cuda/ccuda.pyx":3999
 *             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":3993
 * 
 * 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":3992
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleUnload
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleUnload(__pyx_t_4cuda_5ccuda_CUmodule __pyx_v_hmod) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4001, 1, __PYX_ERR(0, 4001, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4002
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleUnload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4003
 * 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, 4003, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4007
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmodule))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload)(__pyx_v_hmod);

    /* "cuda/_cuda/ccuda.pyx":4008
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     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":4002
 * 
 * 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":4001
 *     return err
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleUnload
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetFunction
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction(__pyx_t_4cuda_5ccuda_CUfunction *__pyx_v_hfunc, __pyx_t_4cuda_5ccuda_CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4010, 1, __PYX_ERR(0, 4010, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4011
 * 
 * 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":4012
 * 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, 4012, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4016
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUmodule, const char*) nogil> __cuModuleGetFunction)(hfunc, hmod, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction *, __pyx_t_4cuda_5ccuda_CUmodule, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction)(__pyx_v_hfunc, __pyx_v_hmod, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4017
 *             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":4011
 * 
 * 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":4010
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetGlobal_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetGlobal_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, __pyx_t_4cuda_5ccuda_CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4019, 1, __PYX_ERR(0, 4019, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4020
 * 
 * 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":4021
 * 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, 4021, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4025
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t *, __pyx_t_4cuda_5ccuda_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":4026
 *             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":4020
 * 
 * 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":4019
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetTexRef
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetTexRef(__pyx_t_4cuda_5ccuda_CUtexref *__pyx_v_pTexRef, __pyx_t_4cuda_5ccuda_CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4028, 1, __PYX_ERR(0, 4028, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4029
 * 
 * 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":4030
 * 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, 4030, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4034
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')
 *     err = (<CUresult (*)(CUtexref*, CUmodule, const char*) nogil> __cuModuleGetTexRef)(pTexRef, hmod, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref *, __pyx_t_4cuda_5ccuda_CUmodule, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef)(__pyx_v_pTexRef, __pyx_v_hmod, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4035
 *             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":4029
 * 
 * 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":4028
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetSurfRef
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef(__pyx_t_4cuda_5ccuda_CUsurfref *__pyx_v_pSurfRef, __pyx_t_4cuda_5ccuda_CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4037, 1, __PYX_ERR(0, 4037, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4038
 * 
 * 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":4039
 * 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, 4039, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4043
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 *     err = (<CUresult (*)(CUsurfref*, CUmodule, const char*) nogil> __cuModuleGetSurfRef)(pSurfRef, hmod, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUsurfref *, __pyx_t_4cuda_5ccuda_CUmodule, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef)(__pyx_v_pSurfRef, __pyx_v_hmod, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4044
 *             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":4038
 * 
 * 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":4037
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLinkCreate_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkCreate_v2(unsigned int __pyx_v_numOptions, __pyx_t_4cuda_5ccuda_CUjit_option *__pyx_v_options, void **__pyx_v_optionValues, __pyx_t_4cuda_5ccuda_CUlinkState *__pyx_v_stateOut) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4046, 1, __PYX_ERR(0, 4046, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4047
 * 
 * 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":4048
 * 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, 4048, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4052
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int, __pyx_t_4cuda_5ccuda_CUjit_option *, void **, __pyx_t_4cuda_5ccuda_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":4053
 *             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":4047
 * 
 * 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":4046
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddData_v2(__pyx_t_4cuda_5ccuda_CUlinkState __pyx_v_state, __pyx_t_4cuda_5ccuda_CUjitInputType __pyx_v_typename, void *__pyx_v_data, size_t __pyx_v_size, char const *__pyx_v_name, unsigned int __pyx_v_numOptions, __pyx_t_4cuda_5ccuda_CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4055, 1, __PYX_ERR(0, 4055, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4056
 * 
 * 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":4057
 * 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, 4057, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4061
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUlinkState, __pyx_t_4cuda_5ccuda_CUjitInputType, void *, size_t, char const *, unsigned int, __pyx_t_4cuda_5ccuda_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":4062
 *             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":4056
 * 
 * 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":4055
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddFile_v2(__pyx_t_4cuda_5ccuda_CUlinkState __pyx_v_state, __pyx_t_4cuda_5ccuda_CUjitInputType __pyx_v_typename, char const *__pyx_v_path, unsigned int __pyx_v_numOptions, __pyx_t_4cuda_5ccuda_CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4064, 1, __PYX_ERR(0, 4064, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4065
 * 
 * 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":4066
 * 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, 4066, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4070
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUlinkState, __pyx_t_4cuda_5ccuda_CUjitInputType, char const *, unsigned int, __pyx_t_4cuda_5ccuda_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":4071
 *             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":4065
 * 
 * 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":4064
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLinkComplete
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkComplete(__pyx_t_4cuda_5ccuda_CUlinkState __pyx_v_state, void **__pyx_v_cubinOut, size_t *__pyx_v_sizeOut) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4073, 1, __PYX_ERR(0, 4073, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4074
 * 
 * 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":4075
 * 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, 4075, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4079
 *         with gil:
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 *     err = (<CUresult (*)(CUlinkState, void**, size_t*) nogil> __cuLinkComplete)(state, cubinOut, sizeOut)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUlinkState, void **, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete)(__pyx_v_state, __pyx_v_cubinOut, __pyx_v_sizeOut);

    /* "cuda/_cuda/ccuda.pyx":4080
 *             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":4074
 * 
 * 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":4073
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLinkDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkDestroy(__pyx_t_4cuda_5ccuda_CUlinkState __pyx_v_state) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4082, 1, __PYX_ERR(0, 4082, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4083
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLinkDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4084
 * 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, 4084, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4088
 *         with gil:
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUlinkState))__pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy)(__pyx_v_state);

    /* "cuda/_cuda/ccuda.pyx":4089
 *             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":4083
 * 
 * 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":4082
 *     return err
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLinkDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemGetInfo_v2(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemGetInfo_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetInfo_v2(size_t *__pyx_v_free, size_t *__pyx_v_total) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4091, 1, __PYX_ERR(0, 4091, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4092
 * 
 * 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":4093
 * 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, 4093, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4097
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(size_t *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2)(__pyx_v_free, __pyx_v_total);

    /* "cuda/_cuda/ccuda.pyx":4098
 *             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":4092
 * 
 * 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":4091
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemAlloc_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAlloc_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4100, 1, __PYX_ERR(0, 4100, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4101
 * 
 * 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":4102
 * 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, 4102, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4106
 *         with gil:
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t) nogil> __cuMemAlloc_v2)(dptr, bytesize)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2)(__pyx_v_dptr, __pyx_v_bytesize);

    /* "cuda/_cuda/ccuda.pyx":4107
 *             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":4101
 * 
 * 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":4100
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_pPitch, size_t __pyx_v_WidthInBytes, size_t __pyx_v_Height, unsigned int __pyx_v_ElementSizeBytes) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4109, 1, __PYX_ERR(0, 4109, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4110
 * 
 * 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":4111
 * 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, 4111, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4115
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4116
 *             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":4110
 * 
 * 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":4109
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemFree_v2(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemFree_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemFree_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4118, 1, __PYX_ERR(0, 4118, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4119
 * 
 * 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":4120
 * 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, 4120, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4124
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2)(__pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":4125
 *             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":4119
 * 
 * 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":4118
 *     return err
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemFree_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAddressRange_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAddressRange_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_pbase, size_t *__pyx_v_psize, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4127, 1, __PYX_ERR(0, 4127, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4128
 * 
 * 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":4129
 * 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, 4129, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4133
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t *, __pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2)(__pyx_v_pbase, __pyx_v_psize, __pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":4134
 *             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":4128
 * 
 * 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":4127
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemAllocHost_v2(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocHost_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocHost_v2(void **__pyx_v_pp, size_t __pyx_v_bytesize) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4136, 1, __PYX_ERR(0, 4136, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4137
 * 
 * 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":4138
 * 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, 4138, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4142
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 *     err = (<CUresult (*)(void**, size_t) nogil> __cuMemAllocHost_v2)(pp, bytesize)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void **, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2)(__pyx_v_pp, __pyx_v_bytesize);

    /* "cuda/_cuda/ccuda.pyx":4143
 *             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":4137
 * 
 * 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":4136
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemFreeHost
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeHost(void *__pyx_v_p) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4145, 1, __PYX_ERR(0, 4145, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":4147
 * 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, 4147, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4151
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost)(__pyx_v_p);

    /* "cuda/_cuda/ccuda.pyx":4152
 *             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":4146
 * 
 * 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":4145
 *     return err
 * 
 * cdef CUresult _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemFreeHost
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemHostAlloc
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc(void **__pyx_v_pp, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4154, 1, __PYX_ERR(0, 4154, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4155
 * 
 * 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":4156
 * 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, 4156, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4160
 *         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 = ((__pyx_t_4cuda_5ccuda_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":4161
 *             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":4155
 * 
 * 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":4154
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemHostGetDevicePointer_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetDevicePointer_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_pdptr, void *__pyx_v_p, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4163, 1, __PYX_ERR(0, 4163, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4164
 * 
 * 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":4165
 * 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, 4165, __pyx_L4_error)

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

    /* "cuda/_cuda/ccuda.pyx":4169
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4170
 *             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":4164
 * 
 * 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":4163
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemHostGetFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetFlags(unsigned int *__pyx_v_pFlags, void *__pyx_v_p) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4172, 1, __PYX_ERR(0, 4172, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4173
 * 
 * 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":4174
 * 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, 4174, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4175
 *     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":4176
 *     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":4177
 *     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, 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 __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":4175
 *     global __cuMemHostGetFlags
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4178
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int *, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags)(__pyx_v_pFlags, __pyx_v_p);

    /* "cuda/_cuda/ccuda.pyx":4179
 *             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":4173
 * 
 * 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":4172
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocManaged
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocManaged(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4181, 1, __PYX_ERR(0, 4181, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4182
 * 
 * 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":4183
 * 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, 4183, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4184
 *     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":4185
 *     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":4186
 *     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, 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 __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":4184
 *     global __cuMemAllocManaged
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4187
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4188
 *             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":4182
 * 
 * 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":4181
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetByPCIBusId
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetByPCIBusId(__pyx_t_4cuda_5ccuda_CUdevice *__pyx_v_dev, char const *__pyx_v_pciBusId) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4190, 1, __PYX_ERR(0, 4190, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4191
 * 
 * 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":4192
 * 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, 4192, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4193
 *     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":4194
 *     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":4195
 *     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, 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 __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":4193
 *     global __cuDeviceGetByPCIBusId
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4196
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice *, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId)(__pyx_v_dev, __pyx_v_pciBusId);

    /* "cuda/_cuda/ccuda.pyx":4197
 *             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":4191
 * 
 * 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":4190
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetPCIBusId
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetPCIBusId(char *__pyx_v_pciBusId, int __pyx_v_length, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4199, 1, __PYX_ERR(0, 4199, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4200
 * 
 * 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":4201
 * 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, 4201, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4202
 *     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":4203
 *     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":4204
 *     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, 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 __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":4202
 *     global __cuDeviceGetPCIBusId
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4205
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetPCIBusId)(pciBusId, length, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(char *, int, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId)(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4206
 *             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":4200
 * 
 * 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":4199
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetEventHandle(__pyx_t_4cuda_5ccuda_CUipcEventHandle *__pyx_v_pHandle, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_event) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4208, 1, __PYX_ERR(0, 4208, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4209
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcGetEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4210
 * 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, 4210, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4211
 *     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":4212
 *     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":4213
 *     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, 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 __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":4211
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4214
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUipcEventHandle *, __pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle)(__pyx_v_pHandle, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":4215
 *             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":4209
 * 
 * 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":4208
 *     return err
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenEventHandle(__pyx_t_4cuda_5ccuda_CUevent *__pyx_v_phEvent, __pyx_t_4cuda_5ccuda_CUipcEventHandle __pyx_v_handle) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4217, 1, __PYX_ERR(0, 4217, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4218
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcOpenEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4219
 * 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, 4219, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4220
 *     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":4221
 *     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":4222
 *     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, 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 __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":4220
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4223
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUevent *, __pyx_t_4cuda_5ccuda_CUipcEventHandle))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle)(__pyx_v_phEvent, __pyx_v_handle);

    /* "cuda/_cuda/ccuda.pyx":4224
 *             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":4218
 * 
 * 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":4217
 *     return err
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetMemHandle(__pyx_t_4cuda_5ccuda_CUipcMemHandle *__pyx_v_pHandle, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4226, 1, __PYX_ERR(0, 4226, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4227
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcGetMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4228
 * 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, 4228, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4229
 *     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":4230
 *     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":4231
 *     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, 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 __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":4229
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4232
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUipcMemHandle *, __pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle)(__pyx_v_pHandle, __pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":4233
 *             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":4227
 * 
 * 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":4226
 *     return err
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcOpenMemHandle_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenMemHandle_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_pdptr, __pyx_t_4cuda_5ccuda_CUipcMemHandle __pyx_v_handle, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4235, 1, __PYX_ERR(0, 4235, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4236
 * 
 * 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":4237
 * 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, 4237, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4238
 *     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":4239
 *     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":4240
 *     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, 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 __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":4238
 *     global __cuIpcOpenMemHandle_v2
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4241
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, __pyx_t_4cuda_5ccuda_CUipcMemHandle, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2)(__pyx_v_pdptr, __pyx_v_handle, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":4242
 *             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":4236
 * 
 * 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":4235
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcCloseMemHandle(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4244, 1, __PYX_ERR(0, 4244, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4245
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcCloseMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4246
 * 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, 4246, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4247
 *     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":4248
 *     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":4249
 *     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, 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 __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":4247
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4250
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle)(__pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":4251
 *             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":4245
 * 
 * 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":4244
 *     return err
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemHostRegister_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostRegister_v2(void *__pyx_v_p, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4253, 1, __PYX_ERR(0, 4253, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4254
 * 
 * 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":4255
 * 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, 4255, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4256
 *     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":4257
 *     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":4258
 *     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, 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 __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":4256
 *     global __cuMemHostRegister_v2
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4259
 *         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 = ((__pyx_t_4cuda_5ccuda_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":4260
 *             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":4254
 * 
 * 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":4253
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemHostUnregister
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostUnregister(void *__pyx_v_p) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4262, 1, __PYX_ERR(0, 4262, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4263
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemHostUnregister             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4264
 * 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, 4264, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4265
 *     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":4266
 *     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":4267
 *     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, 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 __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":4265
 *     global __cuMemHostUnregister
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4268
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister)(__pyx_v_p);

    /* "cuda/_cuda/ccuda.pyx":4269
 *             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":4263
 * 
 * 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":4262
 *     return err
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemHostUnregister
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dst, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4271, 1, __PYX_ERR(0, 4271, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4272
 * 
 * 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":4273
 * 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, 4273, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4274
 *     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":4275
 *     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":4276
 *     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, 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 __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":4274
 *     global __cuMemcpy
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4277
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpy)(dst, src, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy)(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4278
 *             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":4272
 * 
 * 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":4271
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyPeer
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeer(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_dstContext, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_srcDevice, __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4280, 1, __PYX_ERR(0, 4280, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4281
 * 
 * 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":4282
 * 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, 4282, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4283
 *     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":4284
 *     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":4285
 *     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, 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 __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":4283
 *     global __cuMemcpyPeer
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4286
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUcontext, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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":4287
 *             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":4281
 * 
 * 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":4280
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoD_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4289, 1, __PYX_ERR(0, 4289, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4290
 * 
 * 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":4291
 * 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, 4291, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4292
 *     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":4293
 *     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":4294
 *     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, 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 __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":4292
 *     global __cuMemcpyHtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4295
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4296
 *             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":4290
 * 
 * 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":4289
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoH_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2(void *__pyx_v_dstHost, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4298, 1, __PYX_ERR(0, 4298, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4299
 * 
 * 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":4300
 * 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, 4300, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4301
 *     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":4302
 *     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":4303
 *     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, 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 __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":4301
 *     global __cuMemcpyDtoH_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4304
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2)(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4305
 *             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":4299
 * 
 * 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":4298
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoD_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4307, 1, __PYX_ERR(0, 4307, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4308
 * 
 * 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":4309
 * 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, 4309, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4310
 *     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":4311
 *     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":4312
 *     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, 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 __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":4310
 *     global __cuMemcpyDtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4313
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2)(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4314
 *             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":4308
 * 
 * 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":4307
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoA_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoA_v2(__pyx_t_4cuda_5ccuda_CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4316, 1, __PYX_ERR(0, 4316, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4317
 * 
 * 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":4318
 * 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, 4318, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4319
 *     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":4320
 *     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":4321
 *     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, 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 __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":4319
 *     global __cuMemcpyDtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4322
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray, size_t, __pyx_t_4cuda_5ccuda_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":4323
 *             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":4317
 * 
 * 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":4316
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoD_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoD_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4325, 1, __PYX_ERR(0, 4325, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4326
 * 
 * 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":4327
 * 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, 4327, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4328
 *     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":4329
 *     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":4330
 *     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, 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 __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":4328
 *     global __cuMemcpyAtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4331
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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":4332
 *             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":4326
 * 
 * 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":4325
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoA_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoA_v2(__pyx_t_4cuda_5ccuda_CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4334, 1, __PYX_ERR(0, 4334, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4335
 * 
 * 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":4336
 * 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, 4336, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4337
 *     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":4338
 *     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":4339
 *     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, 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 __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":4337
 *     global __cuMemcpyHtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4340
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4341
 *             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":4335
 * 
 * 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":4334
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoH_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoH_v2(void *__pyx_v_dstHost, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4343, 1, __PYX_ERR(0, 4343, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4344
 * 
 * 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":4345
 * 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, 4345, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4346
 *     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":4347
 *     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":4348
 *     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, 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 __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":4346
 *     global __cuMemcpyAtoH_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4349
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, __pyx_t_4cuda_5ccuda_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":4350
 *             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":4344
 * 
 * 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":4343
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoA_v2(__pyx_t_4cuda_5ccuda_CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4352, 1, __PYX_ERR(0, 4352, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4353
 * 
 * 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":4354
 * 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, 4354, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4355
 *     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":4356
 *     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":4357
 *     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, 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 __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":4355
 *     global __cuMemcpyAtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4358
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray, size_t, __pyx_t_4cuda_5ccuda_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":4359
 *             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":4353
 * 
 * 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":4352
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2D_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2D_v2(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *__pyx_v_pCopy) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4361, 1, __PYX_ERR(0, 4361, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4362
 * 
 * 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":4363
 * 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, 4363, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4364
 *     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":4365
 *     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":4366
 *     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, 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 __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":4364
 *     global __cuMemcpy2D_v2
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4367
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2D_v2)(pCopy)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2)(__pyx_v_pCopy);

    /* "cuda/_cuda/ccuda.pyx":4368
 *             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":4362
 * 
 * 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":4361
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2DUnaligned_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *__pyx_v_pCopy) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4370, 1, __PYX_ERR(0, 4370, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4371
 * 
 * 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":4372
 * 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, 4372, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4373
 *     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":4374
 *     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":4375
 *     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, 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 __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":4373
 *     global __cuMemcpy2DUnaligned_v2
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4376
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2DUnaligned_v2)(pCopy)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2)(__pyx_v_pCopy);

    /* "cuda/_cuda/ccuda.pyx":4377
 *             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":4371
 * 
 * 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":4370
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3D_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *__pyx_v_pCopy) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4379, 1, __PYX_ERR(0, 4379, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4380
 * 
 * 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":4381
 * 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, 4381, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4382
 *     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":4383
 *     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":4384
 *     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, 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 __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":4382
 *     global __cuMemcpy3D_v2
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4385
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*) nogil> __cuMemcpy3D_v2)(pCopy)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2)(__pyx_v_pCopy);

    /* "cuda/_cuda/ccuda.pyx":4386
 *             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":4380
 * 
 * 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":4379
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DPeer
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4388, 1, __PYX_ERR(0, 4388, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4389
 * 
 * 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":4390
 * 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, 4390, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4391
 *     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":4392
 *     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":4393
 *     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, 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 __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":4391
 *     global __cuMemcpy3DPeer
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4394
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer)(__pyx_v_pCopy);

    /* "cuda/_cuda/ccuda.pyx":4395
 *             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":4389
 * 
 * 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":4388
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dst, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4397, 1, __PYX_ERR(0, 4397, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4398
 * 
 * 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":4399
 * 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, 4399, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4400
 *     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":4401
 *     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":4402
 *     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, 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 __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":4400
 *     global __cuMemcpyAsync
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4403
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync)(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4404
 *             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":4398
 * 
 * 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":4397
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyPeerAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeerAsync(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_dstContext, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_srcDevice, __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4406, 1, __PYX_ERR(0, 4406, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4407
 * 
 * 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":4408
 * 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, 4408, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4409
 *     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":4410
 *     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":4411
 *     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, 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 __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":4409
 *     global __cuMemcpyPeerAsync
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4412
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUcontext, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUcontext, size_t, __pyx_t_4cuda_5ccuda_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":4413
 *             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":4407
 * 
 * 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":4406
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoDAsync_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4415, 1, __PYX_ERR(0, 4415, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4416
 * 
 * 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":4417
 * 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, 4417, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4418
 *     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":4419
 *     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":4420
 *     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, 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 __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":4418
 *     global __cuMemcpyHtoDAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4421
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, void const *, size_t, __pyx_t_4cuda_5ccuda_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":4422
 *             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":4416
 * 
 * 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":4415
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoHAsync_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2(void *__pyx_v_dstHost, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4424, 1, __PYX_ERR(0, 4424, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4425
 * 
 * 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":4426
 * 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, 4426, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4427
 *     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":4428
 *     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":4429
 *     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, 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 __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":4427
 *     global __cuMemcpyDtoHAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4430
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_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":4431
 *             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":4425
 * 
 * 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":4424
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoDAsync_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4433, 1, __PYX_ERR(0, 4433, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4434
 * 
 * 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":4435
 * 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, 4435, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4436
 *     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":4437
 *     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":4438
 *     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, 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 __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":4436
 *     global __cuMemcpyDtoDAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4439
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_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":4440
 *             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":4434
 * 
 * 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":4433
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoAAsync_v2(__pyx_t_4cuda_5ccuda_CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4442, 1, __PYX_ERR(0, 4442, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4443
 * 
 * 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":4444
 * 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, 4444, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4445
 *     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":4446
 *     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":4447
 *     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, 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 __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":4445
 *     global __cuMemcpyHtoAAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4448
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray, size_t, void const *, size_t, __pyx_t_4cuda_5ccuda_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":4449
 *             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":4443
 * 
 * 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":4442
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoHAsync_v2(void *__pyx_v_dstHost, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4451, 1, __PYX_ERR(0, 4451, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4452
 * 
 * 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":4453
 * 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, 4453, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4454
 *     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":4455
 *     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":4456
 *     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, 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 __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":4454
 *     global __cuMemcpyAtoHAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4457
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, __pyx_t_4cuda_5ccuda_CUarray, size_t, size_t, __pyx_t_4cuda_5ccuda_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":4458
 *             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":4452
 * 
 * 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":4451
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2DAsync_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *__pyx_v_pCopy, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4460, 1, __PYX_ERR(0, 4460, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4461
 * 
 * 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":4462
 * 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, 4462, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4463
 *     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":4464
 *     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":4465
 *     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, 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 __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":4463
 *     global __cuMemcpy2DAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4466
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2)(__pyx_v_pCopy, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4467
 *             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":4461
 * 
 * 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":4460
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DAsync_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *__pyx_v_pCopy, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4469, 1, __PYX_ERR(0, 4469, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4470
 * 
 * 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":4471
 * 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, 4471, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4472
 *     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":4473
 *     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":4474
 *     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, 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 __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":4472
 *     global __cuMemcpy3DAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4475
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2)(__pyx_v_pCopy, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4476
 *             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":4470
 * 
 * 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":4469
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DPeerAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4478, 1, __PYX_ERR(0, 4478, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4479
 * 
 * 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":4480
 * 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, 4480, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4481
 *     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":4482
 *     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":4483
 *     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, 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 __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":4481
 *     global __cuMemcpy3DPeerAsync
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4484
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*, CUstream) nogil> __cuMemcpy3DPeerAsync)(pCopy, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync)(__pyx_v_pCopy, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4485
 *             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":4479
 * 
 * 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":4478
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD8_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4487, 1, __PYX_ERR(0, 4487, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4488
 * 
 * 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":4489
 * 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, 4489, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4490
 *     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":4491
 *     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":4492
 *     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, 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 __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":4490
 *     global __cuMemsetD8_v2
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4493
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4494
 *             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":4488
 * 
 * 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":4487
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD16_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4496, 1, __PYX_ERR(0, 4496, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4497
 * 
 * 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":4498
 * 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, 4498, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4499
 *     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":4500
 *     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":4501
 *     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, 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 __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":4499
 *     global __cuMemsetD16_v2
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4502
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4503
 *             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":4497
 * 
 * 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":4496
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD32_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4505, 1, __PYX_ERR(0, 4505, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4506
 * 
 * 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":4507
 * 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, 4507, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4508
 *     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":4509
 *     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":4510
 *     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, 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 __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":4508
 *     global __cuMemsetD32_v2
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4511
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4512
 *             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":4506
 * 
 * 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":4505
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4514, 1, __PYX_ERR(0, 4514, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4515
 * 
 * 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":4516
 * 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, 4516, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4517
 *     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":4518
 *     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":4519
 *     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, 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 __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":4517
 *     global __cuMemsetD2D8_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4520
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4521
 *             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":4515
 * 
 * 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":4514
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4523, 1, __PYX_ERR(0, 4523, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4524
 * 
 * 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":4525
 * 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, 4525, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4526
 *     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":4527
 *     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":4528
 *     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, 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 __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":4526
 *     global __cuMemsetD2D16_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4529
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4530
 *             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":4524
 * 
 * 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":4523
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4532, 1, __PYX_ERR(0, 4532, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4533
 * 
 * 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":4534
 * 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, 4534, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4535
 *     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":4536
 *     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":4537
 *     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, 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 __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":4535
 *     global __cuMemsetD2D32_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4538
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":4539
 *             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":4533
 * 
 * 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":4532
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD8Async
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4541, 1, __PYX_ERR(0, 4541, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4542
 * 
 * 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":4543
 * 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, 4543, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4544
 *     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":4545
 *     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":4546
 *     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, 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 __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":4544
 *     global __cuMemsetD8Async
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4547
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned char, size_t, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async)(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4548
 *             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":4542
 * 
 * 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":4541
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD16Async
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16Async(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4550, 1, __PYX_ERR(0, 4550, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4551
 * 
 * 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":4552
 * 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, 4552, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4553
 *     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":4554
 *     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":4555
 *     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, 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 __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":4553
 *     global __cuMemsetD16Async
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4556
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned short, size_t, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async)(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4557
 *             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":4551
 * 
 * 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":4550
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD32Async
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32Async(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4559, 1, __PYX_ERR(0, 4559, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4560
 * 
 * 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":4561
 * 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, 4561, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4562
 *     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":4563
 *     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":4564
 *     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, 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 __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":4562
 *     global __cuMemsetD32Async
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4565
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned int, size_t, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async)(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4566
 *             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":4560
 * 
 * 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":4559
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4568, 1, __PYX_ERR(0, 4568, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4569
 * 
 * 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":4570
 * 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, 4570, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4571
 *     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":4572
 *     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":4573
 *     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, 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 __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":4571
 *     global __cuMemsetD2D8Async
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4574
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned char, size_t, size_t, __pyx_t_4cuda_5ccuda_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":4575
 *             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":4569
 * 
 * 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":4568
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16Async(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4577, 1, __PYX_ERR(0, 4577, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4578
 * 
 * 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":4579
 * 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, 4579, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4580
 *     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":4581
 *     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":4582
 *     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, 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 __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":4580
 *     global __cuMemsetD2D16Async
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4583
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned short, size_t, size_t, __pyx_t_4cuda_5ccuda_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":4584
 *             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":4578
 * 
 * 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":4577
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32Async(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4586, 1, __PYX_ERR(0, 4586, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4587
 * 
 * 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":4588
 * 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, 4588, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4589
 *     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":4590
 *     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":4591
 *     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, 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 __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":4589
 *     global __cuMemsetD2D32Async
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4592
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned int, size_t, size_t, __pyx_t_4cuda_5ccuda_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":4593
 *             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":4587
 * 
 * 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":4586
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArrayCreate_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayCreate_v2(__pyx_t_4cuda_5ccuda_CUarray *__pyx_v_pHandle, __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR const *__pyx_v_pAllocateArray) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4595, 1, __PYX_ERR(0, 4595, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4596
 * 
 * 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":4597
 * 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, 4597, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4598
 *     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":4599
 *     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":4600
 *     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, 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 __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":4598
 *     global __cuArrayCreate_v2
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4601
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR const *))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2)(__pyx_v_pHandle, __pyx_v_pAllocateArray);

    /* "cuda/_cuda/ccuda.pyx":4602
 *             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":4596
 * 
 * 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":4595
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetDescriptor_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetDescriptor_v2(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR *__pyx_v_pArrayDescriptor, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_hArray) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4604, 1, __PYX_ERR(0, 4604, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4605
 * 
 * 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":4606
 * 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, 4606, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4607
 *     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":4608
 *     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":4609
 *     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, 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 __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":4607
 *     global __cuArrayGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4610
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR *, __pyx_t_4cuda_5ccuda_CUarray))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2)(__pyx_v_pArrayDescriptor, __pyx_v_hArray);

    /* "cuda/_cuda/ccuda.pyx":4611
 *             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":4605
 * 
 * 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":4604
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetSparseProperties(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_array) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4613, 1, __PYX_ERR(0, 4613, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4614
 * 
 * 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":4615
 * 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, 4615, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4616
 *     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":4617
 *     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":4618
 *     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, 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 __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":4616
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4619
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUarray) nogil> __cuArrayGetSparseProperties)(sparseProperties, array)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES *, __pyx_t_4cuda_5ccuda_CUarray))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties)(__pyx_v_sparseProperties, __pyx_v_array);

    /* "cuda/_cuda/ccuda.pyx":4620
 *             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":4614
 * 
 * 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":4613
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetSparseProperties(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, __pyx_t_4cuda_5ccuda_CUmipmappedArray __pyx_v_mipmap) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4622, 1, __PYX_ERR(0, 4622, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4623
 * 
 * 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":4624
 * 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, 4624, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4625
 *     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":4626
 *     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":4627
 *     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, 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 __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":4625
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4628
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUmipmappedArray) nogil> __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES *, __pyx_t_4cuda_5ccuda_CUmipmappedArray))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties)(__pyx_v_sparseProperties, __pyx_v_mipmap);

    /* "cuda/_cuda/ccuda.pyx":4629
 *             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":4623
 * 
 * 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":4622
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetMemoryRequirements
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetMemoryRequirements(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_array, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_device) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4631, 1, __PYX_ERR(0, 4631, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4632
 * 
 * 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":4633
 * 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, 4633, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4634
 *     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":4635
 *     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":4636
 *     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, 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 __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":4634
 *     global __cuArrayGetMemoryRequirements
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4637
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *, __pyx_t_4cuda_5ccuda_CUarray, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements)(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":4638
 *             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":4632
 * 
 * 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":4631
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetMemoryRequirements
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetMemoryRequirements(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, __pyx_t_4cuda_5ccuda_CUmipmappedArray __pyx_v_mipmap, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_device) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4640, 1, __PYX_ERR(0, 4640, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4641
 * 
 * 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":4642
 * 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, 4642, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4643
 *     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":4644
 *     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":4645
 *     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, 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 __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":4643
 *     global __cuMipmappedArrayGetMemoryRequirements
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4646
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *, __pyx_t_4cuda_5ccuda_CUmipmappedArray, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements)(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":4647
 *             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":4641
 * 
 * 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":4640
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetPlane
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetPlane(__pyx_t_4cuda_5ccuda_CUarray *__pyx_v_pPlaneArray, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_hArray, unsigned int __pyx_v_planeIdx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4649, 1, __PYX_ERR(0, 4649, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4650
 * 
 * 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":4651
 * 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, 4651, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4652
 *     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":4653
 *     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":4654
 *     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, 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 __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":4652
 *     global __cuArrayGetPlane
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4655
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 *     err = (<CUresult (*)(CUarray*, CUarray, unsigned int) nogil> __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUarray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane)(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx);

    /* "cuda/_cuda/ccuda.pyx":4656
 *             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":4650
 * 
 * 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":4649
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArrayDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayDestroy(__pyx_t_4cuda_5ccuda_CUarray __pyx_v_hArray) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4658, 1, __PYX_ERR(0, 4658, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4659
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4660
 * 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, 4660, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4661
 *     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":4662
 *     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":4663
 *     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, 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 __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":4661
 *     global __cuArrayDestroy
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4664
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy)(__pyx_v_hArray);

    /* "cuda/_cuda/ccuda.pyx":4665
 *             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":4659
 * 
 * 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":4658
 *     return err
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArrayDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2(__pyx_t_4cuda_5ccuda_CUarray *__pyx_v_pHandle, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pAllocateArray) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4667, 1, __PYX_ERR(0, 4667, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4668
 * 
 * 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":4669
 * 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, 4669, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4670
 *     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":4671
 *     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":4672
 *     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, 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 __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":4670
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4673
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR const *))__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2)(__pyx_v_pHandle, __pyx_v_pAllocateArray);

    /* "cuda/_cuda/ccuda.pyx":4674
 *             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":4668
 * 
 * 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":4667
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2(__pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pArrayDescriptor, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_hArray) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4676, 1, __PYX_ERR(0, 4676, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4677
 * 
 * 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":4678
 * 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, 4678, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4679
 *     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":4680
 *     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":4681
 *     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, 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 __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":4679
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4682
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR *, __pyx_t_4cuda_5ccuda_CUarray))__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2)(__pyx_v_pArrayDescriptor, __pyx_v_hArray);

    /* "cuda/_cuda/ccuda.pyx":4683
 *             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":4677
 * 
 * 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":4676
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate(__pyx_t_4cuda_5ccuda_CUmipmappedArray *__pyx_v_pHandle, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pMipmappedArrayDesc, unsigned int __pyx_v_numMipmapLevels) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4685, 1, __PYX_ERR(0, 4685, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4686
 * 
 * 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":4687
 * 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, 4687, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4688
 *     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":4689
 *     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":4690
 *     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, 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 __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":4688
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4691
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_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":4692
 *             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":4686
 * 
 * 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":4685
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel(__pyx_t_4cuda_5ccuda_CUarray *__pyx_v_pLevelArray, __pyx_t_4cuda_5ccuda_CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_level) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4694, 1, __PYX_ERR(0, 4694, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4695
 * 
 * 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":4696
 * 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, 4696, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4697
 *     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":4698
 *     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":4699
 *     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, 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 __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":4697
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4700
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 *     err = (<CUresult (*)(CUarray*, CUmipmappedArray, unsigned int) nogil> __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUmipmappedArray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel)(__pyx_v_pLevelArray, __pyx_v_hMipmappedArray, __pyx_v_level);

    /* "cuda/_cuda/ccuda.pyx":4701
 *             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":4695
 * 
 * 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":4694
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayDestroy(__pyx_t_4cuda_5ccuda_CUmipmappedArray __pyx_v_hMipmappedArray) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4703, 1, __PYX_ERR(0, 4703, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4704
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMipmappedArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4705
 * 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, 4705, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4706
 *     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":4707
 *     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":4708
 *     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, 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 __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":4706
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4709
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmipmappedArray))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy)(__pyx_v_hMipmappedArray);

    /* "cuda/_cuda/ccuda.pyx":4710
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)
 *     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":4704
 * 
 * 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":4703
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressReserve(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_alignment, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_addr, unsigned PY_LONG_LONG __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4712, 1, __PYX_ERR(0, 4712, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4713
 * 
 * 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":4714
 * 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, 4714, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4715
 *     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":4716
 *     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":4717
 *     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__134, 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 __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":4715
 *     global __cuMemAddressReserve
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4718
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t, size_t, __pyx_t_4cuda_5ccuda_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":4719
 *             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":4713
 * 
 * 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":4712
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemAddressFree
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressFree(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4721, 1, __PYX_ERR(0, 4721, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4722
 * 
 * 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":4723
 * 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, 4723, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4724
 *     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":4725
 *     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":4726
 *     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__135, 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 __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":4724
 *     global __cuMemAddressFree
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4727
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree)(__pyx_v_ptr, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":4728
 *             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":4722
 * 
 * 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":4721
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemCreate(__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *__pyx_v_handle, size_t __pyx_v_size, __pyx_t_4cuda_5ccuda_CUmemAllocationProp const *__pyx_v_prop, unsigned PY_LONG_LONG __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4730, 1, __PYX_ERR(0, 4730, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4731
 * 
 * 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":4732
 * 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, 4732, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4733
 *     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":4734
 *     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":4735
 *     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__136, 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 __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":4733
 *     global __cuMemCreate
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4736
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *, size_t, __pyx_t_4cuda_5ccuda_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":4737
 *             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":4731
 * 
 * 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":4730
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemRelease
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemRelease(__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle __pyx_v_handle) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4739, 1, __PYX_ERR(0, 4739, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4740
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemRelease             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4741
 * 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, 4741, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4742
 *     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":4743
 *     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":4744
 *     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__137, 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 __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":4742
 *     global __cuMemRelease
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4745
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle))__pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease)(__pyx_v_handle);

    /* "cuda/_cuda/ccuda.pyx":4746
 *             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":4740
 * 
 * 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":4739
 *     return err
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemRelease
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemMap(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_offset, __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle __pyx_v_handle, unsigned PY_LONG_LONG __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4748, 1, __PYX_ERR(0, 4748, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4749
 * 
 * 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":4750
 * 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, 4750, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4751
 *     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":4752
 *     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":4753
 *     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__138, 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 __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":4751
 *     global __cuMemMap
 *     cuPythonInit()
 *     if __cuMemMap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMap" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4754
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, size_t, __pyx_t_4cuda_5ccuda_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":4755
 *             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":4749
 * 
 * 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":4748
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemMapArrayAsync(__pyx_t_4cuda_5ccuda_CUarrayMapInfo *__pyx_v_mapInfoList, unsigned int __pyx_v_count, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4757, 1, __PYX_ERR(0, 4757, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4758
 * 
 * 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":4759
 * 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, 4759, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4760
 *     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":4761
 *     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":4762
 *     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__139, 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 __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":4760
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4763
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 *     err = (<CUresult (*)(CUarrayMapInfo*, unsigned int, CUstream) nogil> __cuMemMapArrayAsync)(mapInfoList, count, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarrayMapInfo *, unsigned int, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync)(__pyx_v_mapInfoList, __pyx_v_count, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4764
 *             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":4758
 * 
 * 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":4757
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemUnmap
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4766, 1, __PYX_ERR(0, 4766, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4767
 * 
 * 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":4768
 * 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, 4768, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4769
 *     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":4770
 *     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":4771
 *     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__140, 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 __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":4769
 *     global __cuMemUnmap
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4772
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap)(__pyx_v_ptr, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":4773
 *             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":4767
 * 
 * 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":4766
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemSetAccess
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, __pyx_t_4cuda_5ccuda_CUmemAccessDesc const *__pyx_v_desc, size_t __pyx_v_count) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4775, 1, __PYX_ERR(0, 4775, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4776
 * 
 * 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":4777
 * 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, 4777, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4778
 *     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":4779
 *     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":4780
 *     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__141, 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 __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":4778
 *     global __cuMemSetAccess
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4781
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_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":4782
 *             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":4776
 * 
 * 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":4775
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAccess
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAccess(unsigned PY_LONG_LONG *__pyx_v_flags, __pyx_t_4cuda_5ccuda_CUmemLocation const *__pyx_v_location, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4784, 1, __PYX_ERR(0, 4784, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4785
 * 
 * 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":4786
 * 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, 4786, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4787
 *     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":4788
 *     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":4789
 *     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__142, 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 __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":4787
 *     global __cuMemGetAccess
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4790
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned PY_LONG_LONG *, __pyx_t_4cuda_5ccuda_CUmemLocation const *, __pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess)(__pyx_v_flags, __pyx_v_location, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":4791
 *             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":4785
 * 
 * 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":4784
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle(void *__pyx_v_shareableHandle, __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle __pyx_v_handle, __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4793, 1, __PYX_ERR(0, 4793, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4794
 * 
 * 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":4795
 * 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, 4795, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4796
 *     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":4797
 *     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":4798
 *     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__143, 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 __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":4796
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4799
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle, __pyx_t_4cuda_5ccuda_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":4800
 *             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":4794
 * 
 * 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":4793
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemImportFromShareableHandle(__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_osHandle, __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType __pyx_v_shHandleType) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4802, 1, __PYX_ERR(0, 4802, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4803
 * 
 * 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":4804
 * 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, 4804, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4805
 *     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":4806
 *     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":4807
 *     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__144, 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 __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":4805
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4808
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*, CUmemAllocationHandleType) nogil> __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *, void *, __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType))__pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle)(__pyx_v_handle, __pyx_v_osHandle, __pyx_v_shHandleType);

    /* "cuda/_cuda/ccuda.pyx":4809
 *             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":4803
 * 
 * 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":4802
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity(size_t *__pyx_v_granularity, __pyx_t_4cuda_5ccuda_CUmemAllocationProp const *__pyx_v_prop, __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags __pyx_v_option) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4811, 1, __PYX_ERR(0, 4811, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4812
 * 
 * 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":4813
 * 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, 4813, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4814
 *     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":4815
 *     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":4816
 *     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__145, 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 __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":4814
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4817
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(size_t *, __pyx_t_4cuda_5ccuda_CUmemAllocationProp const *, __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity)(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option);

    /* "cuda/_cuda/ccuda.pyx":4818
 *             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":4812
 * 
 * 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":4811
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle(__pyx_t_4cuda_5ccuda_CUmemAllocationProp *__pyx_v_prop, __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle __pyx_v_handle) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4820, 1, __PYX_ERR(0, 4820, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4821
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemGetAllocationPropertiesFromHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4822
 * 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, 4822, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4823
 *     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":4824
 *     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":4825
 *     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__146, 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 __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":4823
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4826
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemAllocationProp *, __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle)(__pyx_v_prop, __pyx_v_handle);

    /* "cuda/_cuda/ccuda.pyx":4827
 *             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":4821
 * 
 * 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":4820
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle(__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_addr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4829, 1, __PYX_ERR(0, 4829, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4830
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemRetainAllocationHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4831
 * 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, 4831, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4832
 *     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":4833
 *     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":4834
 *     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__147, 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 __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":4832
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4835
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle)(__pyx_v_handle, __pyx_v_addr);

    /* "cuda/_cuda/ccuda.pyx":4836
 *             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":4830
 * 
 * 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":4829
 *     return err
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4838, 1, __PYX_ERR(0, 4838, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4839
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemFreeAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4840
 * 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, 4840, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4841
 *     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":4842
 *     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":4843
 *     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__148, 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 __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":4841
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4844
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync)(__pyx_v_dptr, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4845
 *             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":4839
 * 
 * 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":4838
 *     return err
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4847, 1, __PYX_ERR(0, 4847, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4848
 * 
 * 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":4849
 * 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, 4849, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4850
 *     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":4851
 *     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":4852
 *     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__149, 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 __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":4850
 *     global __cuMemAllocAsync
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4853
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUstream) nogil> __cuMemAllocAsync)(dptr, bytesize, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync)(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4854
 *             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":4848
 * 
 * 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":4847
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo(__pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool, size_t __pyx_v_minBytesToKeep) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4856, 1, __PYX_ERR(0, 4856, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4857
 * 
 * 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":4858
 * 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, 4858, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4859
 *     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":4860
 *     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":4861
 *     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__150, 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 __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":4859
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4862
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo)(__pyx_v_pool, __pyx_v_minBytesToKeep);

    /* "cuda/_cuda/ccuda.pyx":4863
 *             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":4857
 * 
 * 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":4856
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute(__pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool, __pyx_t_4cuda_5ccuda_CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4865, 1, __PYX_ERR(0, 4865, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4866
 * 
 * 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":4867
 * 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, 4867, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4868
 *     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":4869
 *     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":4870
 *     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__151, 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 __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":4868
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4871
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolSetAttribute)(pool, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemPool_attribute, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute)(__pyx_v_pool, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":4872
 *             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":4866
 * 
 * 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":4865
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute(__pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool, __pyx_t_4cuda_5ccuda_CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4874, 1, __PYX_ERR(0, 4874, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4875
 * 
 * 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":4876
 * 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, 4876, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4877
 *     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":4878
 *     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":4879
 *     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__152, 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 __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":4877
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4880
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolGetAttribute)(pool, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemPool_attribute, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute)(__pyx_v_pool, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":4881
 *             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":4875
 * 
 * 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":4874
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess(__pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool, __pyx_t_4cuda_5ccuda_CUmemAccessDesc const *__pyx_v_map, size_t __pyx_v_count) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4883, 1, __PYX_ERR(0, 4883, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4884
 * 
 * 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":4885
 * 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, 4885, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4886
 *     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":4887
 *     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":4888
 *     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__153, 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 __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":4886
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4889
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemAccessDesc const *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess)(__pyx_v_pool, __pyx_v_map, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":4890
 *             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":4884
 * 
 * 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":4883
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAccess(__pyx_t_4cuda_5ccuda_CUmemAccess_flags *__pyx_v_flags, __pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_memPool, __pyx_t_4cuda_5ccuda_CUmemLocation *__pyx_v_location) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4892, 1, __PYX_ERR(0, 4892, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4893
 * 
 * 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":4894
 * 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, 4894, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4895
 *     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":4896
 *     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":4897
 *     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__154, 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 __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":4895
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4898
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 *     err = (<CUresult (*)(CUmemAccess_flags*, CUmemoryPool, CUmemLocation*) nogil> __cuMemPoolGetAccess)(flags, memPool, location)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemAccess_flags *, __pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemLocation *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess)(__pyx_v_flags, __pyx_v_memPool, __pyx_v_location);

    /* "cuda/_cuda/ccuda.pyx":4899
 *             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":4893
 * 
 * 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":4892
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate(__pyx_t_4cuda_5ccuda_CUmemoryPool *__pyx_v_pool, __pyx_t_4cuda_5ccuda_CUmemPoolProps const *__pyx_v_poolProps) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4901, 1, __PYX_ERR(0, 4901, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4902
 * 
 * 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":4903
 * 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, 4903, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4904
 *     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":4905
 *     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":4906
 *     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__155, 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 __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":4904
 *     global __cuMemPoolCreate
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4907
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool *, __pyx_t_4cuda_5ccuda_CUmemPoolProps const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate)(__pyx_v_pool, __pyx_v_poolProps);

    /* "cuda/_cuda/ccuda.pyx":4908
 *             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":4902
 * 
 * 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":4901
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy(__pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4910, 1, __PYX_ERR(0, 4910, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4911
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4912
 * 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, 4912, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4913
 *     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":4914
 *     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":4915
 *     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__156, 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 __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":4913
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4916
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy)(__pyx_v_pool);

    /* "cuda/_cuda/ccuda.pyx":4917
 *             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":4911
 * 
 * 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":4910
 *     return err
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, __pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4919, 1, __PYX_ERR(0, 4919, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4920
 * 
 * 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":4921
 * 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, 4921, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4922
 *     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":4923
 *     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":4924
 *     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__157, 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 __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":4922
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4925
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t, __pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync)(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_pool, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4926
 *             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":4920
 * 
 * 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":4919
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle(void *__pyx_v_handle_out, __pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool, __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4928, 1, __PYX_ERR(0, 4928, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4929
 * 
 * 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":4930
 * 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, 4930, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4931
 *     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":4932
 *     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":4933
 *     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__158, 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 __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":4931
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4934
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, __pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_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":4935
 *             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":4929
 * 
 * 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":4928
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportFromShareableHandle(__pyx_t_4cuda_5ccuda_CUmemoryPool *__pyx_v_pool_out, void *__pyx_v_handle, __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4937, 1, __PYX_ERR(0, 4937, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4938
 * 
 * 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":4939
 * 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, 4939, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4940
 *     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":4941
 *     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":4942
 *     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__159, 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 __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":4940
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4943
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemoryPool *, void *, __pyx_t_4cuda_5ccuda_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":4944
 *             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":4938
 * 
 * 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":4937
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportPointer(__pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData *__pyx_v_shareData_out, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4946, 1, __PYX_ERR(0, 4946, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4947
 * 
 * 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":4948
 * 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, 4948, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4949
 *     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":4950
 *     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":4951
 *     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__160, 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 __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":4949
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4952
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData *, __pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer)(__pyx_v_shareData_out, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":4953
 *             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":4947
 * 
 * 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":4946
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_ptr_out, __pyx_t_4cuda_5ccuda_CUmemoryPool __pyx_v_pool, __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData *__pyx_v_shareData) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4955, 1, __PYX_ERR(0, 4955, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4956
 * 
 * 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":4957
 * 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, 4957, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4958
 *     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":4959
 *     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":4960
 *     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__161, 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 __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":4958
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4961
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUmemoryPool, CUmemPoolPtrExportData*) nogil> __cuMemPoolImportPointer)(ptr_out, pool, shareData)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, __pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer)(__pyx_v_ptr_out, __pyx_v_pool, __pyx_v_shareData);

    /* "cuda/_cuda/ccuda.pyx":4962
 *             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":4956
 * 
 * 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":4955
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuPointerGetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute(void *__pyx_v_data, __pyx_t_4cuda_5ccuda_CUpointer_attribute __pyx_v_attribute, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4964, 1, __PYX_ERR(0, 4964, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4965
 * 
 * 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":4966
 * 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, 4966, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4967
 *     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":4968
 *     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":4969
 *     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__162, 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 __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":4967
 *     global __cuPointerGetAttribute
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4970
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 *     err = (<CUresult (*)(void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerGetAttribute)(data, attribute, ptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, __pyx_t_4cuda_5ccuda_CUpointer_attribute, __pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute)(__pyx_v_data, __pyx_v_attribute, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":4971
 *             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":4965
 * 
 * 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":4964
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dstDevice, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4973, 1, __PYX_ERR(0, 4973, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4974
 * 
 * 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":4975
 * 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, 4975, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4976
 *     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":4977
 *     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":4978
 *     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__163, 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 __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":4976
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4979
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4980
 *             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":4974
 * 
 * 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":4973
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuMemAdvise
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise(__pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, __pyx_t_4cuda_5ccuda_CUmem_advise __pyx_v_advice, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_device) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4982, 1, __PYX_ERR(0, 4982, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4983
 * 
 * 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":4984
 * 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, 4984, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4985
 *     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":4986
 *     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":4987
 *     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__164, 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 __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":4985
 *     global __cuMemAdvise
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4988
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUmem_advise, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":4989
 *             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":4983
 * 
 * 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":4982
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, __pyx_t_4cuda_5ccuda_CUmem_range_attribute __pyx_v_attribute, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 4991, 1, __PYX_ERR(0, 4991, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4992
 * 
 * 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":4993
 * 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, 4993, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4994
 *     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":4995
 *     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":4996
 *     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__165, 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 __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":4994
 *     global __cuMemRangeGetAttribute
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4997
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void *, size_t, __pyx_t_4cuda_5ccuda_CUmem_range_attribute, __pyx_t_4cuda_5ccuda_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":4998
 *             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":4992
 * 
 * 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":4991
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, __pyx_t_4cuda_5ccuda_CUmem_range_attribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5000, 1, __PYX_ERR(0, 5000, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5001
 * 
 * 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":5002
 * 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, 5002, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5003
 *     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":5004
 *     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":5005
 *     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__166, 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 __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":5003
 *     global __cuMemRangeGetAttributes
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5006
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void **, size_t *, __pyx_t_4cuda_5ccuda_CUmem_range_attribute *, size_t, __pyx_t_4cuda_5ccuda_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":5007
 *             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":5001
 * 
 * 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":5000
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuPointerSetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute(void const *__pyx_v_value, __pyx_t_4cuda_5ccuda_CUpointer_attribute __pyx_v_attribute, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5009, 1, __PYX_ERR(0, 5009, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5010
 * 
 * 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":5011
 * 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, 5011, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5012
 *     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":5013
 *     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":5014
 *     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__167, 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 __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":5012
 *     global __cuPointerSetAttribute
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5015
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void const *, __pyx_t_4cuda_5ccuda_CUpointer_attribute, __pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute)(__pyx_v_value, __pyx_v_attribute, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":5016
 *             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":5010
 * 
 * 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":5009
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuPointerGetAttributes
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes(unsigned int __pyx_v_numAttributes, __pyx_t_4cuda_5ccuda_CUpointer_attribute *__pyx_v_attributes, void **__pyx_v_data, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_ptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5018, 1, __PYX_ERR(0, 5018, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5019
 * 
 * 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":5020
 * 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, 5020, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5021
 *     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":5022
 *     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":5023
 *     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__168, 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 __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":5021
 *     global __cuPointerGetAttributes
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5024
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int, __pyx_t_4cuda_5ccuda_CUpointer_attribute *, void **, __pyx_t_4cuda_5ccuda_CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes)(__pyx_v_numAttributes, __pyx_v_attributes, __pyx_v_data, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":5025
 *             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":5019
 * 
 * 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":5018
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate(__pyx_t_4cuda_5ccuda_CUstream *__pyx_v_phStream, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5027, 1, __PYX_ERR(0, 5027, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5028
 * 
 * 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":5029
 * 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, 5029, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5030
 *     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":5031
 *     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":5032
 *     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__169, 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 __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":5030
 *     global __cuStreamCreate
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5033
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate)(__pyx_v_phStream, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":5034
 *             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":5028
 * 
 * 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":5027
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority(__pyx_t_4cuda_5ccuda_CUstream *__pyx_v_phStream, unsigned int __pyx_v_flags, int __pyx_v_priority) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5036, 1, __PYX_ERR(0, 5036, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5037
 * 
 * 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":5038
 * 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, 5038, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5039
 *     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":5040
 *     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":5041
 *     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__170, 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 __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":5039
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5042
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int, int) nogil> __cuStreamCreateWithPriority)(phStream, flags, priority)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream *, unsigned int, int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority)(__pyx_v_phStream, __pyx_v_flags, __pyx_v_priority);

    /* "cuda/_cuda/ccuda.pyx":5043
 *             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":5037
 * 
 * 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":5036
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetPriority(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, int *__pyx_v_priority) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5045, 1, __PYX_ERR(0, 5045, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5046
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetPriority             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5047
 * 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, 5047, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5048
 *     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":5049
 *     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":5050
 *     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__171, 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 __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":5048
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5051
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, int *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority)(__pyx_v_hStream, __pyx_v_priority);

    /* "cuda/_cuda/ccuda.pyx":5052
 *             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":5046
 * 
 * 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":5045
 *     return err
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, unsigned int *__pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5054, 1, __PYX_ERR(0, 5054, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5055
 * 
 * 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":5056
 * 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, 5056, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5057
 *     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":5058
 *     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":5059
 *     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__172, 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 __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":5057
 *     global __cuStreamGetFlags
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5060
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, unsigned int *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags)(__pyx_v_hStream, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5061
 *             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":5055
 * 
 * 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":5054
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUcontext *__pyx_v_pctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5063, 1, __PYX_ERR(0, 5063, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5064
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetCtx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5065
 * 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, 5065, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5066
 *     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":5067
 *     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":5068
 *     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__173, 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 __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":5066
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5069
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUcontext *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx)(__pyx_v_hStream, __pyx_v_pctx);

    /* "cuda/_cuda/ccuda.pyx":5070
 *             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":5064
 * 
 * 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":5063
 *     return err
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitEvent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_hEvent, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5072, 1, __PYX_ERR(0, 5072, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5073
 * 
 * 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":5074
 * 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, 5074, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5075
 *     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":5076
 *     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":5077
 *     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__174, 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 __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":5075
 *     global __cuStreamWaitEvent
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5078
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 *     err = (<CUresult (*)(CUstream, CUevent, unsigned int) nogil> __cuStreamWaitEvent)(hStream, hEvent, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUevent, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent)(__pyx_v_hStream, __pyx_v_hEvent, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":5079
 *             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":5073
 * 
 * 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":5072
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamAddCallback
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUstreamCallback __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5081, 1, __PYX_ERR(0, 5081, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5082
 * 
 * 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":5083
 * 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, 5083, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5084
 *     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":5085
 *     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":5086
 *     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__175, 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 __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":5084
 *     global __cuStreamAddCallback
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5087
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_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":5088
 *             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":5082
 * 
 * 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":5081
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCapture_v2(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUstreamCaptureMode __pyx_v_mode) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5090, 1, __PYX_ERR(0, 5090, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5091
 * 
 * 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":5092
 * 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, 5092, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5093
 *     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":5094
 *     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":5095
 *     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__176, 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 __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":5093
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5096
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureMode) nogil> __cuStreamBeginCapture_v2)(hStream, mode)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureMode))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2)(__pyx_v_hStream, __pyx_v_mode);

    /* "cuda/_cuda/ccuda.pyx":5097
 *             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":5091
 * 
 * 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":5090
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode(__pyx_t_4cuda_5ccuda_CUstreamCaptureMode *__pyx_v_mode) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5099, 1, __PYX_ERR(0, 5099, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5100
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuThreadExchangeStreamCaptureMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5101
 * 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, 5101, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5102
 *     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":5103
 *     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":5104
 *     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__177, 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 __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":5102
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5105
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstreamCaptureMode *))__pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode)(__pyx_v_mode);

    /* "cuda/_cuda/ccuda.pyx":5106
 *             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":5100
 * 
 * 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":5099
 *     return err
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUgraph *__pyx_v_phGraph) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5108, 1, __PYX_ERR(0, 5108, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5109
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamEndCapture             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5110
 * 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, 5110, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5111
 *     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":5112
 *     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":5113
 *     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__178, 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 __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":5111
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5114
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUgraph *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture)(__pyx_v_hStream, __pyx_v_phGraph);

    /* "cuda/_cuda/ccuda.pyx":5115
 *             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":5109
 * 
 * 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":5108
 *     return err
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *__pyx_v_captureStatus) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5117, 1, __PYX_ERR(0, 5117, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5118
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamIsCapturing             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5119
 * 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, 5119, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5120
 *     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":5121
 *     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":5122
 *     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__179, 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 __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":5120
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5123
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing)(__pyx_v_hStream, __pyx_v_captureStatus);

    /* "cuda/_cuda/ccuda.pyx":5124
 *             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":5118
 * 
 * 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":5117
 *     return err
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCaptureInfo
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *__pyx_v_captureStatus_out, __pyx_t_4cuda_5ccuda_cuuint64_t *__pyx_v_id_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5126, 1, __PYX_ERR(0, 5126, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5127
 * 
 * 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":5128
 * 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, 5128, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5129
 *     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":5130
 *     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":5131
 *     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__180, 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 __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":5129
 *     global __cuStreamGetCaptureInfo
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5132
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *, __pyx_t_4cuda_5ccuda_cuuint64_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo)(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out);

    /* "cuda/_cuda/ccuda.pyx":5133
 *             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":5127
 * 
 * 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":5126
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *__pyx_v_captureStatus_out, __pyx_t_4cuda_5ccuda_cuuint64_t *__pyx_v_id_out, __pyx_t_4cuda_5ccuda_CUgraph *__pyx_v_graph_out, __pyx_t_4cuda_5ccuda_CUgraphNode const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5135, 1, __PYX_ERR(0, 5135, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5136
 * 
 * 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":5137
 * 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, 5137, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5138
 *     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":5139
 *     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":5140
 *     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__181, 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 __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":5138
 *     global __cuStreamGetCaptureInfo_v2
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5141
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *, __pyx_t_4cuda_5ccuda_cuuint64_t *, __pyx_t_4cuda_5ccuda_CUgraph *, __pyx_t_4cuda_5ccuda_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":5142
 *             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":5136
 * 
 * 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":5135
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5144, 1, __PYX_ERR(0, 5144, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5145
 * 
 * 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":5146
 * 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, 5146, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5147
 *     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":5148
 *     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":5149
 *     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__182, 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 __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":5147
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5150
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_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":5151
 *             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":5145
 * 
 * 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":5144
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAttachMemAsync(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr, size_t __pyx_v_length, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5153, 1, __PYX_ERR(0, 5153, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5154
 * 
 * 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":5155
 * 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, 5155, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5156
 *     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":5157
 *     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":5158
 *     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__183, 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 __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":5156
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5159
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_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":5160
 *             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":5154
 * 
 * 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":5153
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamQuery
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamQuery(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5162, 1, __PYX_ERR(0, 5162, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5163
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5164
 * 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, 5164, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5165
 *     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":5166
 *     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":5167
 *     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__184, 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 __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":5165
 *     global __cuStreamQuery
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5168
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery)(__pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5169
 *             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":5163
 * 
 * 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":5162
 *     return err
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamQuery
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5171, 1, __PYX_ERR(0, 5171, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5172
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5173
 * 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, 5173, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5174
 *     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":5175
 *     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":5176
 *     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__185, 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 __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":5174
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5177
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize)(__pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5178
 *             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":5172
 * 
 * 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":5171
 *     return err
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamDestroy_v2(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5180, 1, __PYX_ERR(0, 5180, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5181
 * 
 * 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":5182
 * 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, 5182, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5183
 *     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":5184
 *     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":5185
 *     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__186, 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 __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":5183
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5186
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2)(__pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5187
 *             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":5181
 * 
 * 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":5180
 *     return err
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_dst, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_src) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5189, 1, __PYX_ERR(0, 5189, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5190
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5191
 * 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, 5191, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5192
 *     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":5193
 *     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":5194
 *     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__187, 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 __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":5192
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5195
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes)(__pyx_v_dst, __pyx_v_src);

    /* "cuda/_cuda/ccuda.pyx":5196
 *             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":5190
 * 
 * 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":5189
 *     return err
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUstreamAttrID __pyx_v_attr, __pyx_t_4cuda_5ccuda_CUstreamAttrValue *__pyx_v_value_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5198, 1, __PYX_ERR(0, 5198, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5199
 * 
 * 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":5200
 * 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, 5200, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5201
 *     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":5202
 *     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":5203
 *     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__188, 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 __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":5201
 *     global __cuStreamGetAttribute
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5204
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue*) nogil> __cuStreamGetAttribute)(hStream, attr, value_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamAttrID, __pyx_t_4cuda_5ccuda_CUstreamAttrValue *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute)(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value_out);

    /* "cuda/_cuda/ccuda.pyx":5205
 *             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":5199
 * 
 * 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":5198
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamSetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUstreamAttrID __pyx_v_attr, __pyx_t_4cuda_5ccuda_CUstreamAttrValue const *__pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5207, 1, __PYX_ERR(0, 5207, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5208
 * 
 * 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":5209
 * 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, 5209, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5210
 *     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":5211
 *     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":5212
 *     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__189, 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 __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":5210
 *     global __cuStreamSetAttribute
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5213
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, const CUstreamAttrValue*) nogil> __cuStreamSetAttribute)(hStream, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamAttrID, __pyx_t_4cuda_5ccuda_CUstreamAttrValue const *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute)(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5214
 *             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":5208
 * 
 * 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":5207
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate(__pyx_t_4cuda_5ccuda_CUevent *__pyx_v_phEvent, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5216, 1, __PYX_ERR(0, 5216, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5217
 * 
 * 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":5218
 * 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, 5218, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5219
 *     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":5220
 *     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":5221
 *     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__190, 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 __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":5219
 *     global __cuEventCreate
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5222
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUevent *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate)(__pyx_v_phEvent, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":5223
 *             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":5217
 * 
 * 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":5216
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventRecord
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord(__pyx_t_4cuda_5ccuda_CUevent __pyx_v_hEvent, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5225, 1, __PYX_ERR(0, 5225, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5226
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventRecord             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5227
 * 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, 5227, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5228
 *     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":5229
 *     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":5230
 *     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__191, 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 __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":5228
 *     global __cuEventRecord
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5231
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUevent, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord)(__pyx_v_hEvent, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5232
 *             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":5226
 * 
 * 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":5225
 *     return err
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventRecord
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags(__pyx_t_4cuda_5ccuda_CUevent __pyx_v_hEvent, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5234, 1, __PYX_ERR(0, 5234, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5235
 * 
 * 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":5236
 * 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, 5236, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5237
 *     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":5238
 *     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":5239
 *     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__192, 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 __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":5237
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5240
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 *     err = (<CUresult (*)(CUevent, CUstream, unsigned int) nogil> __cuEventRecordWithFlags)(hEvent, hStream, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUevent, __pyx_t_4cuda_5ccuda_CUstream, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags)(__pyx_v_hEvent, __pyx_v_hStream, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5241
 *             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":5235
 * 
 * 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":5234
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventQuery
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery(__pyx_t_4cuda_5ccuda_CUevent __pyx_v_hEvent) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5243, 1, __PYX_ERR(0, 5243, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5244
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5245
 * 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, 5245, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5246
 *     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":5247
 *     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":5248
 *     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__193, 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 __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":5246
 *     global __cuEventQuery
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5249
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery)(__pyx_v_hEvent);

    /* "cuda/_cuda/ccuda.pyx":5250
 *             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":5244
 * 
 * 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":5243
 *     return err
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventQuery
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventSynchronize
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize(__pyx_t_4cuda_5ccuda_CUevent __pyx_v_hEvent) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5252, 1, __PYX_ERR(0, 5252, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5253
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5254
 * 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, 5254, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5255
 *     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":5256
 *     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":5257
 *     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__194, 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 __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":5255
 *     global __cuEventSynchronize
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5258
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize)(__pyx_v_hEvent);

    /* "cuda/_cuda/ccuda.pyx":5259
 *             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":5253
 * 
 * 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":5252
 *     return err
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventSynchronize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEventDestroy_v2(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2(__pyx_t_4cuda_5ccuda_CUevent __pyx_v_hEvent) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5261, 1, __PYX_ERR(0, 5261, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5262
 * 
 * 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":5263
 * 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, 5263, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5264
 *     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":5265
 *     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":5266
 *     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__195, 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 __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":5264
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5267
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2)(__pyx_v_hEvent);

    /* "cuda/_cuda/ccuda.pyx":5268
 *             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":5262
 * 
 * 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":5261
 *     return err
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventElapsedTime
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime(float *__pyx_v_pMilliseconds, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_hStart, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_hEnd) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5270, 1, __PYX_ERR(0, 5270, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5271
 * 
 * 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":5272
 * 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, 5272, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5273
 *     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":5274
 *     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":5275
 *     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__196, 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 __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":5273
 *     global __cuEventElapsedTime
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5276
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 *     err = (<CUresult (*)(float*, CUevent, CUevent) nogil> __cuEventElapsedTime)(pMilliseconds, hStart, hEnd)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(float *, __pyx_t_4cuda_5ccuda_CUevent, __pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime)(__pyx_v_pMilliseconds, __pyx_v_hStart, __pyx_v_hEnd);

    /* "cuda/_cuda/ccuda.pyx":5277
 *             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":5271
 * 
 * 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":5270
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuImportExternalMemory
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory(__pyx_t_4cuda_5ccuda_CUexternalMemory *__pyx_v_extMem_out, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *__pyx_v_memHandleDesc) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5279, 1, __PYX_ERR(0, 5279, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5280
 * 
 * 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":5281
 * 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, 5281, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5282
 *     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":5283
 *     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":5284
 *     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__197, 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 __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":5282
 *     global __cuImportExternalMemory
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5285
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUexternalMemory *, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory)(__pyx_v_extMem_out, __pyx_v_memHandleDesc);

    /* "cuda/_cuda/ccuda.pyx":5286
 *             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":5280
 * 
 * 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":5279
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedBuffer(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_devPtr, __pyx_t_4cuda_5ccuda_CUexternalMemory __pyx_v_extMem, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *__pyx_v_bufferDesc) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5288, 1, __PYX_ERR(0, 5288, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5289
 * 
 * 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":5290
 * 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, 5290, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5291
 *     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":5292
 *     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":5293
 *     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__198, 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 __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":5291
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5294
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, __pyx_t_4cuda_5ccuda_CUexternalMemory, __pyx_t_4cuda_5ccuda_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":5295
 *             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":5289
 * 
 * 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":5288
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedMipmappedArray(__pyx_t_4cuda_5ccuda_CUmipmappedArray *__pyx_v_mipmap, __pyx_t_4cuda_5ccuda_CUexternalMemory __pyx_v_extMem, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *__pyx_v_mipmapDesc) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5297, 1, __PYX_ERR(0, 5297, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5298
 * 
 * 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":5299
 * 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, 5299, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5300
 *     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":5301
 *     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":5302
 *     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__199, 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 __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":5300
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5303
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_CUexternalMemory, __pyx_t_4cuda_5ccuda_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":5304
 *             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":5298
 * 
 * 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":5297
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalMemory(__pyx_t_4cuda_5ccuda_CUexternalMemory __pyx_v_extMem) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5306, 1, __PYX_ERR(0, 5306, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5307
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDestroyExternalMemory             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5308
 * 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, 5308, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5309
 *     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":5310
 *     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":5311
 *     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__200, 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 __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":5309
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5312
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUexternalMemory))__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory)(__pyx_v_extMem);

    /* "cuda/_cuda/ccuda.pyx":5313
 *             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":5307
 * 
 * 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":5306
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore(__pyx_t_4cuda_5ccuda_CUexternalSemaphore *__pyx_v_extSem_out, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *__pyx_v_semHandleDesc) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5315, 1, __PYX_ERR(0, 5315, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5316
 * 
 * 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":5317
 * 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, 5317, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5318
 *     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":5319
 *     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":5320
 *     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__201, 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 __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":5318
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5321
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUexternalSemaphore *, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore)(__pyx_v_extSem_out, __pyx_v_semHandleDesc);

    /* "cuda/_cuda/ccuda.pyx":5322
 *             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":5316
 * 
 * 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":5315
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSignalExternalSemaphoresAsync(__pyx_t_4cuda_5ccuda_CUexternalSemaphore const *__pyx_v_extSemArray, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5324, 1, __PYX_ERR(0, 5324, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5325
 * 
 * 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":5326
 * 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, 5326, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5327
 *     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":5328
 *     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":5329
 *     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__202, 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 __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":5327
 *     global __cuSignalExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5330
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUexternalSemaphore const *, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync)(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream);

    /* "cuda/_cuda/ccuda.pyx":5331
 *             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":5325
 * 
 * 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":5324
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync(__pyx_t_4cuda_5ccuda_CUexternalSemaphore const *__pyx_v_extSemArray, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5333, 1, __PYX_ERR(0, 5333, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5334
 * 
 * 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":5335
 * 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, 5335, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5336
 *     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":5337
 *     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":5338
 *     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__203, 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 __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":5336
 *     global __cuWaitExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5339
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUexternalSemaphore const *, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync)(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream);

    /* "cuda/_cuda/ccuda.pyx":5340
 *             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":5334
 * 
 * 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":5333
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore(__pyx_t_4cuda_5ccuda_CUexternalSemaphore __pyx_v_extSem) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5342, 1, __PYX_ERR(0, 5342, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5343
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDestroyExternalSemaphore             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5344
 * 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, 5344, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5345
 *     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":5346
 *     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":5347
 *     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__204, 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 __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":5345
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5348
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUexternalSemaphore))__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore)(__pyx_v_extSem);

    /* "cuda/_cuda/ccuda.pyx":5349
 *             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":5343
 * 
 * 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":5342
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue32
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_addr, __pyx_t_4cuda_5ccuda_cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5351, 1, __PYX_ERR(0, 5351, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5352
 * 
 * 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":5353
 * 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, 5353, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5354
 *     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":5355
 *     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":5356
 *     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__205, 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 __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":5354
 *     global __cuStreamWaitValue32
 *     cuPythonInit()
 *     if __cuStreamWaitValue32 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5357
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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":5358
 *             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":5352
 * 
 * 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":5351
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue64
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_addr, __pyx_t_4cuda_5ccuda_cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5360, 1, __PYX_ERR(0, 5360, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5361
 * 
 * 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":5362
 * 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, 5362, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5363
 *     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":5364
 *     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":5365
 *     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__206, 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 __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":5363
 *     global __cuStreamWaitValue64
 *     cuPythonInit()
 *     if __cuStreamWaitValue64 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5366
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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":5367
 *             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":5361
 * 
 * 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":5360
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue32
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_addr, __pyx_t_4cuda_5ccuda_cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5369, 1, __PYX_ERR(0, 5369, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5370
 * 
 * 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":5371
 * 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, 5371, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5372
 *     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":5373
 *     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":5374
 *     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__207, 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 __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":5372
 *     global __cuStreamWriteValue32
 *     cuPythonInit()
 *     if __cuStreamWriteValue32 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5375
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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":5376
 *             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":5370
 * 
 * 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":5369
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue64
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_addr, __pyx_t_4cuda_5ccuda_cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5378, 1, __PYX_ERR(0, 5378, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5379
 * 
 * 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":5380
 * 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, 5380, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5381
 *     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":5382
 *     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":5383
 *     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__208, 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 __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":5381
 *     global __cuStreamWriteValue64
 *     cuPythonInit()
 *     if __cuStreamWriteValue64 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5384
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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":5385
 *             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":5379
 * 
 * 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":5378
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamBatchMemOp
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, unsigned int __pyx_v_count, __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams *__pyx_v_paramArray, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5387, 1, __PYX_ERR(0, 5387, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5388
 * 
 * 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":5389
 * 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, 5389, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5390
 *     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":5391
 *     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":5392
 *     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__209, 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 __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":5390
 *     global __cuStreamBatchMemOp
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5393
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, unsigned int, __pyx_t_4cuda_5ccuda_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":5394
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp)(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":5388
 * 
 * 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":5387
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncGetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute(int *__pyx_v_pi, __pyx_t_4cuda_5ccuda_CUfunction_attribute __pyx_v_attrib, __pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5396, 1, __PYX_ERR(0, 5396, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5397
 * 
 * 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":5398
 * 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, 5398, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5399
 *     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":5400
 *     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":5401
 *     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__210, 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 __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":5399
 *     global __cuFuncGetAttribute
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5402
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUfunction) nogil> __cuFuncGetAttribute)(pi, attrib, hfunc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, __pyx_t_4cuda_5ccuda_CUfunction_attribute, __pyx_t_4cuda_5ccuda_CUfunction))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute)(__pyx_v_pi, __pyx_v_attrib, __pyx_v_hfunc);

    /* "cuda/_cuda/ccuda.pyx":5403
 *             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":5397
 * 
 * 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":5396
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, __pyx_t_4cuda_5ccuda_CUfunction_attribute __pyx_v_attrib, int __pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5405, 1, __PYX_ERR(0, 5405, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5406
 * 
 * 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":5407
 * 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, 5407, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5408
 *     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":5409
 *     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":5410
 *     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__211, 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 __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":5408
 *     global __cuFuncSetAttribute
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5411
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunction_attribute, int) nogil> __cuFuncSetAttribute)(hfunc, attrib, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_CUfunction_attribute, int))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute)(__pyx_v_hfunc, __pyx_v_attrib, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5412
 *             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":5406
 * 
 * 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":5405
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, __pyx_t_4cuda_5ccuda_CUfunc_cache __pyx_v_config) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5414, 1, __PYX_ERR(0, 5414, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5415
 * 
 * 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":5416
 * 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, 5416, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5417
 *     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":5418
 *     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":5419
 *     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__212, 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 __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":5417
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5420
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_CUfunc_cache))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig)(__pyx_v_hfunc, __pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":5421
 *             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":5415
 * 
 * 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":5414
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, __pyx_t_4cuda_5ccuda_CUsharedconfig __pyx_v_config) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5423, 1, __PYX_ERR(0, 5423, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5424
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncSetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5425
 * 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, 5425, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5426
 *     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":5427
 *     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":5428
 *     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__213, 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 __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":5426
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5429
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_CUsharedconfig))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig)(__pyx_v_hfunc, __pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":5430
 *             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":5424
 * 
 * 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":5423
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncGetModule
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule(__pyx_t_4cuda_5ccuda_CUmodule *__pyx_v_hmod, __pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5432, 1, __PYX_ERR(0, 5432, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5433
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncGetModule             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5434
 * 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, 5434, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5435
 *     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":5436
 *     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":5437
 *     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__214, 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 __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":5435
 *     global __cuFuncGetModule
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5438
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmodule *, __pyx_t_4cuda_5ccuda_CUfunction))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule)(__pyx_v_hmod, __pyx_v_hfunc);

    /* "cuda/_cuda/ccuda.pyx":5439
 *             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":5433
 * 
 * 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":5432
 *     return err
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncGetModule
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel(__pyx_t_4cuda_5ccuda_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, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, void **__pyx_v_kernelParams, void **__pyx_v_extra) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5441, 1, __PYX_ERR(0, 5441, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5442
 * 
 * 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":5443
 * 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, 5443, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5444
 *     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":5445
 *     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":5446
 *     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__215, 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 __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":5444
 *     global __cuLaunchKernel
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5447
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, __pyx_t_4cuda_5ccuda_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":5448
 *             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 _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":5442
 * 
 * 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":5441
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel(__pyx_t_4cuda_5ccuda_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, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, void **__pyx_v_kernelParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5450, 1, __PYX_ERR(0, 5450, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5451
 * 
 * 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":5452
 * 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, 5452, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5453
 *     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":5454
 *     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":5455
 *     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__216, 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 __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":5453
 *     global __cuLaunchCooperativeKernel
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5456
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, __pyx_t_4cuda_5ccuda_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":5457
 *             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":5451
 * 
 * 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":5450
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice(__pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS *__pyx_v_launchParamsList, unsigned int __pyx_v_numDevices, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5459, 1, __PYX_ERR(0, 5459, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5460
 * 
 * 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":5461
 * 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, 5461, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5462
 *     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":5463
 *     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":5464
 *     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__217, 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 __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":5462
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5465
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":5466
 *             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":5460
 * 
 * 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":5459
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLaunchHostFunc
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchHostFunc(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream, __pyx_t_4cuda_5ccuda_CUhostFn __pyx_v_fn, void *__pyx_v_userData) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5468, 1, __PYX_ERR(0, 5468, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5469
 * 
 * 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":5470
 * 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, 5470, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5471
 *     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":5472
 *     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":5473
 *     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__218, 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 __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":5471
 *     global __cuLaunchHostFunc
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5474
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 *     err = (<CUresult (*)(CUstream, CUhostFn, void*) nogil> __cuLaunchHostFunc)(hStream, fn, userData)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUhostFn, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc)(__pyx_v_hStream, __pyx_v_fn, __pyx_v_userData);

    /* "cuda/_cuda/ccuda.pyx":5475
 *             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":5469
 * 
 * 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":5468
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5477, 1, __PYX_ERR(0, 5477, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5478
 * 
 * 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":5479
 * 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, 5479, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5480
 *     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":5481
 *     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":5482
 *     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__219, 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 __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":5480
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5483
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":5484
 *             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":5478
 * 
 * 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":5477
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedSize(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5486, 1, __PYX_ERR(0, 5486, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5487
 * 
 * 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":5488
 * 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, 5488, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5489
 *     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":5490
 *     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":5491
 *     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__220, 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 __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":5489
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5492
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize)(__pyx_v_hfunc, __pyx_v_numbytes);

    /* "cuda/_cuda/ccuda.pyx":5493
 *             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":5487
 * 
 * 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":5486
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuParamSetSize
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5495, 1, __PYX_ERR(0, 5495, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5496
 * 
 * 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":5497
 * 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, 5497, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5498
 *     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":5499
 *     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":5500
 *     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__221, 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 __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":5498
 *     global __cuParamSetSize
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5501
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize)(__pyx_v_hfunc, __pyx_v_numbytes);

    /* "cuda/_cuda/ccuda.pyx":5502
 *             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":5496
 * 
 * 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":5495
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuParamSeti
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, int __pyx_v_offset, unsigned int __pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5504, 1, __PYX_ERR(0, 5504, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5505
 * 
 * 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":5506
 * 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, 5506, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5507
 *     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":5508
 *     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":5509
 *     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__222, 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 __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":5507
 *     global __cuParamSeti
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5510
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')
 *     err = (<CUresult (*)(CUfunction, int, unsigned int) nogil> __cuParamSeti)(hfunc, offset, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, int, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti)(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5511
 *             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":5505
 * 
 * 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":5504
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuParamSetf
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetf(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, int __pyx_v_offset, float __pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5513, 1, __PYX_ERR(0, 5513, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5514
 * 
 * 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":5515
 * 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, 5515, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5516
 *     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":5517
 *     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":5518
 *     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__223, 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 __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":5516
 *     global __cuParamSetf
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5519
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')
 *     err = (<CUresult (*)(CUfunction, int, float) nogil> __cuParamSetf)(hfunc, offset, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, int, float))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf)(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5520
 *             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":5514
 * 
 * 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":5513
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuParamSetv
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, int __pyx_v_offset, void *__pyx_v_ptr, unsigned int __pyx_v_numbytes) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5522, 1, __PYX_ERR(0, 5522, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5523
 * 
 * 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":5524
 * 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, 5524, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5525
 *     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":5526
 *     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":5527
 *     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__224, 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 __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":5525
 *     global __cuParamSetv
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetv" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5528
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":5529
 *             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":5523
 * 
 * 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":5522
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLaunch
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunch(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_f) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5531, 1, __PYX_ERR(0, 5531, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5532
 * 
 * cdef CUresult _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunch == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5533
 * 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, 5533, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5534
 *     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":5535
 *     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":5536
 *     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__225, 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 __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":5534
 *     global __cuLaunch
 *     cuPythonInit()
 *     if __cuLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5537
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunch)(__pyx_v_f);

    /* "cuda/_cuda/ccuda.pyx":5538
 *             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":5532
 * 
 * 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":5531
 *     return err
 * 
 * cdef CUresult _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLaunch
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLaunchGrid
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5540, 1, __PYX_ERR(0, 5540, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5541
 * 
 * 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":5542
 * 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, 5542, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5543
 *     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":5544
 *     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":5545
 *     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__226, 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 __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":5543
 *     global __cuLaunchGrid
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5546
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":5547
 *             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":5541
 * 
 * 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":5540
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuLaunchGridAsync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5549, 1, __PYX_ERR(0, 5549, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5550
 * 
 * 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":5551
 * 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, 5551, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5552
 *     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":5553
 *     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":5554
 *     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__227, 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 __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":5552
 *     global __cuLaunchGridAsync
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5555
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, int, int, __pyx_t_4cuda_5ccuda_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":5556
 *             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":5550
 * 
 * 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":5549
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuParamSetTexRef
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef(__pyx_t_4cuda_5ccuda_CUfunction __pyx_v_hfunc, int __pyx_v_texunit, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5558, 1, __PYX_ERR(0, 5558, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5559
 * 
 * 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":5560
 * 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, 5560, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5561
 *     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":5562
 *     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":5563
 *     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__228, 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 __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":5561
 *     global __cuParamSetTexRef
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5564
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 *     err = (<CUresult (*)(CUfunction, int, CUtexref) nogil> __cuParamSetTexRef)(hfunc, texunit, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfunction, int, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef)(__pyx_v_hfunc, __pyx_v_texunit, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":5565
 *             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":5559
 * 
 * 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":5558
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate(__pyx_t_4cuda_5ccuda_CUgraph *__pyx_v_phGraph, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5567, 1, __PYX_ERR(0, 5567, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5568
 * 
 * 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":5569
 * 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, 5569, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5570
 *     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":5571
 *     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":5572
 *     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__229, 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 __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":5570
 *     global __cuGraphCreate
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5573
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate)(__pyx_v_phGraph, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5574
 *             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":5568
 * 
 * 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":5567
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5576, 1, __PYX_ERR(0, 5576, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5577
 * 
 * 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":5578
 * 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, 5578, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5579
 *     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":5580
 *     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":5581
 *     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__230, 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 __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":5579
 *     global __cuGraphAddKernelNode
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5582
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5583
 *             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":5577
 * 
 * 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":5576
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeGetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5585, 1, __PYX_ERR(0, 5585, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5586
 * 
 * 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":5587
 * 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, 5587, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5588
 *     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":5589
 *     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":5590
 *     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__231, 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 __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":5588
 *     global __cuGraphKernelNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5591
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5592
 *             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":5586
 * 
 * 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":5585
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5594, 1, __PYX_ERR(0, 5594, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5595
 * 
 * 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":5596
 * 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, 5596, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5597
 *     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":5598
 *     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":5599
 *     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__232, 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 __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":5597
 *     global __cuGraphKernelNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5600
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5601
 *             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":5595
 * 
 * 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":5594
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemcpyNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *__pyx_v_copyParams, __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5603, 1, __PYX_ERR(0, 5603, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5604
 * 
 * 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":5605
 * 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, 5605, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5606
 *     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":5607
 *     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":5608
 *     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__233, 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 __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":5606
 *     global __cuGraphAddMemcpyNode
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5609
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *, __pyx_t_4cuda_5ccuda_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":5610
 *             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":5604
 * 
 * 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":5603
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5612, 1, __PYX_ERR(0, 5612, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5613
 * 
 * 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":5614
 * 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, 5614, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5615
 *     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":5616
 *     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":5617
 *     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__234, 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 __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":5615
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5618
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5619
 *             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":5613
 * 
 * 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":5612
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5621, 1, __PYX_ERR(0, 5621, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5622
 * 
 * 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":5623
 * 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, 5623, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5624
 *     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":5625
 *     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":5626
 *     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__235, 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 __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":5624
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5627
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5628
 *             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":5622
 * 
 * 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":5621
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5630, 1, __PYX_ERR(0, 5630, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5631
 * 
 * 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":5632
 * 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, 5632, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5633
 *     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":5634
 *     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":5635
 *     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__236, 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 __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":5633
 *     global __cuGraphAddMemsetNode
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5636
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS const *, __pyx_t_4cuda_5ccuda_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":5637
 *             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":5631
 * 
 * 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":5630
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5639, 1, __PYX_ERR(0, 5639, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5640
 * 
 * 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":5641
 * 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, 5641, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5642
 *     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":5643
 *     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":5644
 *     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__237, 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 __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":5642
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5645
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeGetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5646
 *             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":5640
 * 
 * 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":5639
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5648, 1, __PYX_ERR(0, 5648, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5649
 * 
 * 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":5650
 * 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, 5650, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5651
 *     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":5652
 *     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":5653
 *     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__238, 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 __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":5651
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5654
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5655
 *             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":5649
 * 
 * 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":5648
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddHostNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5657, 1, __PYX_ERR(0, 5657, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5658
 * 
 * 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":5659
 * 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, 5659, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5660
 *     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":5661
 *     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":5662
 *     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__239, 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 __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":5660
 *     global __cuGraphAddHostNode
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5663
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5664
 *             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":5658
 * 
 * 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":5657
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeGetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5666, 1, __PYX_ERR(0, 5666, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5667
 * 
 * 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":5668
 * 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, 5668, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5669
 *     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":5670
 *     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":5671
 *     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__240, 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 __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":5669
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5672
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeGetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5673
 *             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":5667
 * 
 * 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":5666
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5675, 1, __PYX_ERR(0, 5675, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5676
 * 
 * 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":5677
 * 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, 5677, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5678
 *     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":5679
 *     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":5680
 *     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__241, 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 __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":5678
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5681
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5682
 *             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":5676
 * 
 * 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":5675
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddChildGraphNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_childGraph) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5684, 1, __PYX_ERR(0, 5684, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5685
 * 
 * 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":5686
 * 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, 5686, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5687
 *     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":5688
 *     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":5689
 *     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__242, 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 __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":5687
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5690
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5691
 *             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":5685
 * 
 * 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":5684
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUgraph *__pyx_v_phGraph) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5693, 1, __PYX_ERR(0, 5693, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5694
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphChildGraphNodeGetGraph             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5695
 * 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, 5695, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5696
 *     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":5697
 *     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":5698
 *     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__243, 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 __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":5696
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5699
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraph *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph)(__pyx_v_hNode, __pyx_v_phGraph);

    /* "cuda/_cuda/ccuda.pyx":5700
 *             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":5694
 * 
 * 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":5693
 *     return err
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5702, 1, __PYX_ERR(0, 5702, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5703
 * 
 * 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":5704
 * 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, 5704, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5705
 *     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":5706
 *     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":5707
 *     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__244, 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 __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":5705
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5708
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_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":5709
 *             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":5703
 * 
 * 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":5702
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventRecordNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_event) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5711, 1, __PYX_ERR(0, 5711, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5712
 * 
 * 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":5713
 * 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, 5713, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5714
 *     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":5715
 *     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":5716
 *     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__245, 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 __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":5714
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5717
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5718
 *             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":5712
 * 
 * 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":5711
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUevent *__pyx_v_event_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5720, 1, __PYX_ERR(0, 5720, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5721
 * 
 * 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":5722
 * 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, 5722, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5723
 *     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":5724
 *     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":5725
 *     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__246, 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 __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":5723
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5726
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent)(__pyx_v_hNode, __pyx_v_event_out);

    /* "cuda/_cuda/ccuda.pyx":5727
 *             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":5721
 * 
 * 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":5720
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_event) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5729, 1, __PYX_ERR(0, 5729, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5730
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphEventRecordNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5731
 * 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, 5731, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5732
 *     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":5733
 *     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":5734
 *     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__247, 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 __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":5732
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5735
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent)(__pyx_v_hNode, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":5736
 *             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":5730
 * 
 * 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":5729
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_event) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5738, 1, __PYX_ERR(0, 5738, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5739
 * 
 * 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":5740
 * 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, 5740, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5741
 *     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":5742
 *     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":5743
 *     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__248, 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 __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":5741
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5744
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5745
 *             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":5739
 * 
 * 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":5738
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUevent *__pyx_v_event_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5747, 1, __PYX_ERR(0, 5747, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5748
 * 
 * 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":5749
 * 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, 5749, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5750
 *     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":5751
 *     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":5752
 *     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__249, 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 __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":5750
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5753
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent)(__pyx_v_hNode, __pyx_v_event_out);

    /* "cuda/_cuda/ccuda.pyx":5754
 *             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":5748
 * 
 * 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":5747
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_event) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5756, 1, __PYX_ERR(0, 5756, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5757
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphEventWaitNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5758
 * 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, 5758, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5759
 *     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":5760
 *     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":5761
 *     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__250, 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 __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":5759
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5762
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent)(__pyx_v_hNode, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":5763
 *             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":5757
 * 
 * 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":5756
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5765, 1, __PYX_ERR(0, 5765, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5766
 * 
 * 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":5767
 * 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, 5767, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5768
 *     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":5769
 *     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":5770
 *     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__251, 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 __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":5768
 *     global __cuGraphAddExternalSemaphoresSignalNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5771
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5772
 *             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":5766
 * 
 * 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":5765
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeGetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_params_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5774, 1, __PYX_ERR(0, 5774, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5775
 * 
 * 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":5776
 * 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, 5776, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5777
 *     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":5778
 *     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":5779
 *     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__252, 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 __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":5777
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5780
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out);

    /* "cuda/_cuda/ccuda.pyx":5781
 *             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":5775
 * 
 * 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":5774
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5783, 1, __PYX_ERR(0, 5783, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5784
 * 
 * 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":5785
 * 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, 5785, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5786
 *     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":5787
 *     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":5788
 *     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__253, 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 __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":5786
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5789
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5790
 *             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":5784
 * 
 * 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":5783
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresWaitNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5792, 1, __PYX_ERR(0, 5792, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5793
 * 
 * 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":5794
 * 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, 5794, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5795
 *     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":5796
 *     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":5797
 *     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__254, 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 __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":5795
 *     global __cuGraphAddExternalSemaphoresWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5798
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5799
 *             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":5793
 * 
 * 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":5792
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeGetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_params_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5801, 1, __PYX_ERR(0, 5801, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5802
 * 
 * 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":5803
 * 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, 5803, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5804
 *     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":5805
 *     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":5806
 *     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__255, 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 __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":5804
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5807
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out);

    /* "cuda/_cuda/ccuda.pyx":5808
 *             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":5802
 * 
 * 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":5801
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5810, 1, __PYX_ERR(0, 5810, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5811
 * 
 * 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":5812
 * 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, 5812, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5813
 *     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":5814
 *     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":5815
 *     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__256, 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 __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":5813
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5816
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5817
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeSetParams)(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":5811
 * 
 * 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":5810
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5819, 1, __PYX_ERR(0, 5819, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5820
 * 
 * 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":5821
 * 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, 5821, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5822
 *     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":5823
 *     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":5824
 *     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__257, 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 __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":5822
 *     global __cuGraphAddMemAllocNode
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5825
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5826
 *             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":5820
 * 
 * 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":5819
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemAllocNodeGetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_params_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5828, 1, __PYX_ERR(0, 5828, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5829
 * 
 * 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":5830
 * 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, 5830, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5831
 *     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":5832
 *     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":5833
 *     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__258, 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 __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":5831
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5834
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out);

    /* "cuda/_cuda/ccuda.pyx":5835
 *             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":5829
 * 
 * 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":5828
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemFreeNode(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phGraphNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5837, 1, __PYX_ERR(0, 5837, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5838
 * 
 * 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":5839
 * 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, 5839, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5840
 *     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":5841
 *     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":5842
 *     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__259, 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 __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":5840
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5843
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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":5844
 *             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":5838
 * 
 * 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":5837
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_dptr_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5846, 1, __PYX_ERR(0, 5846, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5847
 * 
 * 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":5848
 * 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, 5848, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5849
 *     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":5850
 *     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":5851
 *     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__260, 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 __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":5849
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5852
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUdeviceptr *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams)(__pyx_v_hNode, __pyx_v_dptr_out);

    /* "cuda/_cuda/ccuda.pyx":5853
 *             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":5847
 * 
 * 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":5846
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim(__pyx_t_4cuda_5ccuda_CUdevice __pyx_v_device) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5855, 1, __PYX_ERR(0, 5855, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":5857
 * 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, 5857, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5858
 *     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":5859
 *     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":5860
 *     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__261, 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 __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":5858
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5861
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim)(__pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":5862
 *             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":5856
 * 
 * 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":5855
 *     return err
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute(__pyx_t_4cuda_5ccuda_CUdevice __pyx_v_device, __pyx_t_4cuda_5ccuda_CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5864, 1, __PYX_ERR(0, 5864, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5865
 * 
 * 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":5866
 * 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, 5866, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5867
 *     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":5868
 *     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":5869
 *     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__262, 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 __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":5867
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5870
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceGetGraphMemAttribute)(device, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUgraphMem_attribute, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute)(__pyx_v_device, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5871
 *             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":5865
 * 
 * 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":5864
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute(__pyx_t_4cuda_5ccuda_CUdevice __pyx_v_device, __pyx_t_4cuda_5ccuda_CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5873, 1, __PYX_ERR(0, 5873, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5874
 * 
 * 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":5875
 * 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, 5875, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5876
 *     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":5877
 *     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":5878
 *     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__263, 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 __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":5876
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5879
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceSetGraphMemAttribute)(device, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUgraphMem_attribute, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute)(__pyx_v_device, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5880
 *             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":5874
 * 
 * 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":5873
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphClone
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone(__pyx_t_4cuda_5ccuda_CUgraph *__pyx_v_phGraphClone, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_originalGraph) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5882, 1, __PYX_ERR(0, 5882, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5883
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphClone             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5884
 * 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, 5884, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5885
 *     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":5886
 *     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":5887
 *     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__264, 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 __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":5885
 *     global __cuGraphClone
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5888
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph *, __pyx_t_4cuda_5ccuda_CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone)(__pyx_v_phGraphClone, __pyx_v_originalGraph);

    /* "cuda/_cuda/ccuda.pyx":5889
 *             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":5883
 * 
 * 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":5882
 *     return err
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphClone
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone(__pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phNode, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hOriginalNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hClonedGraph) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5891, 1, __PYX_ERR(0, 5891, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5892
 * 
 * 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":5893
 * 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, 5893, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5894
 *     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":5895
 *     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":5896
 *     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__265, 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 __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":5894
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5897
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraphNode, CUgraph) nogil> __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone)(__pyx_v_phNode, __pyx_v_hOriginalNode, __pyx_v_hClonedGraph);

    /* "cuda/_cuda/ccuda.pyx":5898
 *             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":5892
 * 
 * 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":5891
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUgraphNodeType *__pyx_v_typename) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5900, 1, __PYX_ERR(0, 5900, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5901
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphNodeGetType             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5902
 * 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, 5902, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5903
 *     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":5904
 *     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":5905
 *     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__266, 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 __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":5903
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5906
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraphNodeType *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType)(__pyx_v_hNode, __pyx_v_typename);

    /* "cuda/_cuda/ccuda.pyx":5907
 *             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":5901
 * 
 * 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":5900
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetNodes
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_nodes, size_t *__pyx_v_numNodes) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5909, 1, __PYX_ERR(0, 5909, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5910
 * 
 * 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":5911
 * 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, 5911, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5912
 *     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":5913
 *     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":5914
 *     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__267, 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 __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":5912
 *     global __cuGraphGetNodes
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5915
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetNodes)(hGraph, nodes, numNodes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes)(__pyx_v_hGraph, __pyx_v_nodes, __pyx_v_numNodes);

    /* "cuda/_cuda/ccuda.pyx":5916
 *             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":5910
 * 
 * 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":5909
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_rootNodes, size_t *__pyx_v_numRootNodes) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5918, 1, __PYX_ERR(0, 5918, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5919
 * 
 * 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":5920
 * 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, 5920, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5921
 *     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":5922
 *     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":5923
 *     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__268, 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 __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":5921
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5924
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes)(__pyx_v_hGraph, __pyx_v_rootNodes, __pyx_v_numRootNodes);

    /* "cuda/_cuda/ccuda.pyx":5925
 *             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":5919
 * 
 * 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":5918
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetEdges
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_from_, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_to, size_t *__pyx_v_numEdges) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5927, 1, __PYX_ERR(0, 5927, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5928
 * 
 * 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":5929
 * 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, 5929, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5930
 *     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":5931
 *     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":5932
 *     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__269, 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 __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":5930
 *     global __cuGraphGetEdges
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5933
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_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":5934
 *             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":5928
 * 
 * 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":5927
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_dependencies, size_t *__pyx_v_numDependencies) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5936, 1, __PYX_ERR(0, 5936, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5937
 * 
 * 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":5938
 * 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, 5938, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5939
 *     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":5940
 *     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":5941
 *     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__270, 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 __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":5939
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5942
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies)(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_numDependencies);

    /* "cuda/_cuda/ccuda.pyx":5943
 *             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":5937
 * 
 * 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":5936
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_dependentNodes, size_t *__pyx_v_numDependentNodes) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5945, 1, __PYX_ERR(0, 5945, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5946
 * 
 * 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":5947
 * 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, 5947, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5948
 *     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":5949
 *     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":5950
 *     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__271, 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 __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":5948
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5951
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes)(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_numDependentNodes);

    /* "cuda/_cuda/ccuda.pyx":5952
 *             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":5946
 * 
 * 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":5945
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddDependencies
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_from_, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5954, 1, __PYX_ERR(0, 5954, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5955
 * 
 * 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":5956
 * 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, 5956, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5957
 *     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":5958
 *     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":5959
 *     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__272, 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 __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":5957
 *     global __cuGraphAddDependencies
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5960
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, __pyx_t_4cuda_5ccuda_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":5961
 *             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":5955
 * 
 * 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":5954
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_from_, __pyx_t_4cuda_5ccuda_CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5963, 1, __PYX_ERR(0, 5963, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5964
 * 
 * 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":5965
 * 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, 5965, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5966
 *     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":5967
 *     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":5968
 *     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__273, 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 __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":5966
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5969
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, __pyx_t_4cuda_5ccuda_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":5970
 *             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":5964
 * 
 * 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":5963
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroyNode(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5972, 1, __PYX_ERR(0, 5972, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5973
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphDestroyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5974
 * 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, 5974, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5975
 *     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":5976
 *     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":5977
 *     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__274, 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 __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":5975
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5978
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode)(__pyx_v_hNode);

    /* "cuda/_cuda/ccuda.pyx":5979
 *             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":5973
 * 
 * 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":5972
 *     return err
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphInstantiate_v2(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphInstantiate_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiate_v2(__pyx_t_4cuda_5ccuda_CUgraphExec *__pyx_v_phGraphExec, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_phErrorNode, char *__pyx_v_logBuffer, size_t __pyx_v_bufferSize) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5981, 1, __PYX_ERR(0, 5981, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5982
 * 
 * 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":5983
 * 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, 5983, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5984
 *     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":5985
 *     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":5986
 *     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__275, 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 __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":5984
 *     global __cuGraphInstantiate_v2
 *     cuPythonInit()
 *     if __cuGraphInstantiate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5987
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_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":5988
 *             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":5982
 * 
 * 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":5981
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithFlags(__pyx_t_4cuda_5ccuda_CUgraphExec *__pyx_v_phGraphExec, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, unsigned PY_LONG_LONG __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5990, 1, __PYX_ERR(0, 5990, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5991
 * 
 * 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":5992
 * 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, 5992, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5993
 *     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":5994
 *     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":5995
 *     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__276, 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 __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":5993
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5996
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec *, __pyx_t_4cuda_5ccuda_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":5997
 *             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":5991
 * 
 * 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":5990
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecKernelNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 5999, 1, __PYX_ERR(0, 5999, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6000
 * 
 * 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":6001
 * 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, 6001, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6002
 *     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":6003
 *     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":6004
 *     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__277, 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 __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":6002
 *     global __cuGraphExecKernelNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6005
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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":6006
 *             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":6000
 * 
 * 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":5999
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemcpyNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *__pyx_v_copyParams, __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6008, 1, __PYX_ERR(0, 6008, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6009
 * 
 * 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":6010
 * 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, 6010, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6011
 *     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":6012
 *     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":6013
 *     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__278, 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 __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":6011
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6014
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *, __pyx_t_4cuda_5ccuda_CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_copyParams, __pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":6015
 *             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":6009
 * 
 * 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":6008
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_ctx) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6017, 1, __PYX_ERR(0, 6017, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6018
 * 
 * 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":6019
 * 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, 6019, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6020
 *     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":6021
 *     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":6022
 *     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__279, 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 __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":6020
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6023
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS const *, __pyx_t_4cuda_5ccuda_CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_memsetParams, __pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":6024
 *             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":6018
 * 
 * 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":6017
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6026, 1, __PYX_ERR(0, 6026, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6027
 * 
 * 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":6028
 * 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, 6028, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6029
 *     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":6030
 *     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":6031
 *     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__280, 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 __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":6029
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6032
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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":6033
 *             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":6027
 * 
 * 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":6026
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecChildGraphNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_childGraph) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6035, 1, __PYX_ERR(0, 6035, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6036
 * 
 * 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":6037
 * 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, 6037, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6038
 *     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":6039
 *     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":6040
 *     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__281, 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 __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":6038
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6041
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraph) nogil> __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_childGraph);

    /* "cuda/_cuda/ccuda.pyx":6042
 *             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":6036
 * 
 * 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":6035
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_event) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6044, 1, __PYX_ERR(0, 6044, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6045
 * 
 * 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":6046
 * 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, 6046, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6047
 *     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":6048
 *     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":6049
 *     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__282, 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 __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":6047
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6050
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":6051
 *             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":6045
 * 
 * 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":6044
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUevent __pyx_v_event) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6053, 1, __PYX_ERR(0, 6053, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6054
 * 
 * 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":6055
 * 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, 6055, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6056
 *     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":6057
 *     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":6058
 *     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__283, 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 __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":6056
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6059
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":6060
 *             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":6054
 * 
 * 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":6053
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6062, 1, __PYX_ERR(0, 6062, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6063
 * 
 * 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":6064
 * 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, 6064, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6065
 *     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":6066
 *     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":6067
 *     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__284, 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 __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":6065
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6068
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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":6069
 *             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":6063
 * 
 * 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":6062
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6071, 1, __PYX_ERR(0, 6071, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6072
 * 
 * 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":6073
 * 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, 6073, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6074
 *     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":6075
 *     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":6076
 *     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__285, 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 __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":6074
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6077
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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":6078
 *             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":6072
 * 
 * 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":6071
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeSetEnabled
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetEnabled(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, unsigned int __pyx_v_isEnabled) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6080, 1, __PYX_ERR(0, 6080, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6081
 * 
 * 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":6082
 * 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, 6082, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6083
 *     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":6084
 *     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":6085
 *     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__286, 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 __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":6083
 *     global __cuGraphNodeSetEnabled
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6086
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int) nogil> __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled);

    /* "cuda/_cuda/ccuda.pyx":6087
 *             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":6081
 * 
 * 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":6080
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetEnabled
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6089, 1, __PYX_ERR(0, 6089, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6090
 * 
 * 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":6091
 * 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, 6091, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6092
 *     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":6093
 *     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":6094
 *     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__287, 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 __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":6092
 *     global __cuGraphNodeGetEnabled
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6095
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int*) nogil> __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, unsigned int *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled);

    /* "cuda/_cuda/ccuda.pyx":6096
 *             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":6090
 * 
 * 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":6089
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphUpload
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6098, 1, __PYX_ERR(0, 6098, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6099
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphUpload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6100
 * 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, 6100, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6101
 *     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":6102
 *     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":6103
 *     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__288, 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 __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":6101
 *     global __cuGraphUpload
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6104
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload)(__pyx_v_hGraphExec, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":6105
 *             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":6099
 * 
 * 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":6098
 *     return err
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphUpload
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphLaunch
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6107, 1, __PYX_ERR(0, 6107, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6108
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6109
 * 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, 6109, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6110
 *     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":6111
 *     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":6112
 *     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__289, 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 __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":6110
 *     global __cuGraphLaunch
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6113
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch)(__pyx_v_hGraphExec, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":6114
 *             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":6108
 * 
 * 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":6107
 *     return err
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphLaunch
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6116, 1, __PYX_ERR(0, 6116, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6117
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6118
 * 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, 6118, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6119
 *     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":6120
 *     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":6121
 *     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__290, 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 __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":6119
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6122
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy)(__pyx_v_hGraphExec);

    /* "cuda/_cuda/ccuda.pyx":6123
 *             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":6117
 * 
 * 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":6116
 *     return err
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6125, 1, __PYX_ERR(0, 6125, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6126
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6127
 * 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, 6127, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6128
 *     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":6129
 *     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":6130
 *     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__291, 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 __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":6128
 *     global __cuGraphDestroy
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6131
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy)(__pyx_v_hGraph);

    /* "cuda/_cuda/ccuda.pyx":6132
 *             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":6126
 * 
 * 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":6125
 *     return err
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecUpdate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate(__pyx_t_4cuda_5ccuda_CUgraphExec __pyx_v_hGraphExec, __pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, __pyx_t_4cuda_5ccuda_CUgraphNode *__pyx_v_hErrorNode_out, __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult *__pyx_v_updateResult_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6134, 1, __PYX_ERR(0, 6134, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6135
 * 
 * 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":6136
 * 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, 6136, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6137
 *     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":6138
 *     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":6139
 *     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__292, 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 __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":6137
 *     global __cuGraphExecUpdate
 *     cuPythonInit()
 *     if __cuGraphExecUpdate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6140
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_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":6141
 *             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":6135
 * 
 * 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":6134
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_dst, __pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_src) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6143, 1, __PYX_ERR(0, 6143, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6144
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6145
 * 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, 6145, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6146
 *     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":6147
 *     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":6148
 *     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__293, 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 __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":6146
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6149
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraphNode))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes)(__pyx_v_dst, __pyx_v_src);

    /* "cuda/_cuda/ccuda.pyx":6150
 *             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":6144
 * 
 * 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":6143
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID __pyx_v_attr, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue *__pyx_v_value_out) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6152, 1, __PYX_ERR(0, 6152, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6153
 * 
 * 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":6154
 * 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, 6154, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6155
 *     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":6156
 *     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":6157
 *     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__294, 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 __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":6155
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6158
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute)(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value_out);

    /* "cuda/_cuda/ccuda.pyx":6159
 *             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":6153
 * 
 * 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":6152
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute(__pyx_t_4cuda_5ccuda_CUgraphNode __pyx_v_hNode, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID __pyx_v_attr, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue const *__pyx_v_value) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6161, 1, __PYX_ERR(0, 6161, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6162
 * 
 * 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":6163
 * 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, 6163, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6164
 *     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":6165
 *     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":6166
 *     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__295, 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 __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":6164
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6167
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, const CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeSetAttribute)(hNode, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute)(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":6168
 *             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":6162
 * 
 * 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":6161
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_hGraph, char const *__pyx_v_path, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6170, 1, __PYX_ERR(0, 6170, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6171
 * 
 * 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":6172
 * 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, 6172, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6173
 *     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":6174
 *     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":6175
 *     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__296, 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 __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":6173
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6176
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":6177
 *             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":6171
 * 
 * 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":6170
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectCreate(__pyx_t_4cuda_5ccuda_CUuserObject *__pyx_v_object_out, void *__pyx_v_ptr, __pyx_t_4cuda_5ccuda_CUhostFn __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6179, 1, __PYX_ERR(0, 6179, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6180
 * 
 * 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":6181
 * 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, 6181, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6182
 *     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":6183
 *     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":6184
 *     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__297, 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 __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":6182
 *     global __cuUserObjectCreate
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6185
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUuserObject *, void *, __pyx_t_4cuda_5ccuda_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":6186
 *             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":6180
 * 
 * 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":6179
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectRetain
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRetain(__pyx_t_4cuda_5ccuda_CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6188, 1, __PYX_ERR(0, 6188, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6189
 * 
 * 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":6190
 * 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, 6190, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6191
 *     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":6192
 *     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":6193
 *     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__298, 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 __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":6191
 *     global __cuUserObjectRetain
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6194
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUuserObject, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain)(__pyx_v_object, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":6195
 *             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":6189
 * 
 * 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":6188
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectRelease
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease(__pyx_t_4cuda_5ccuda_CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6197, 1, __PYX_ERR(0, 6197, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6198
 * 
 * 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":6199
 * 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, 6199, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6200
 *     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":6201
 *     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":6202
 *     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__299, 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 __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":6200
 *     global __cuUserObjectRelease
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6203
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUuserObject, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease)(__pyx_v_object, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":6204
 *             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":6198
 * 
 * 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":6197
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_graph, __pyx_t_4cuda_5ccuda_CUuserObject __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6206, 1, __PYX_ERR(0, 6206, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6207
 * 
 * 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":6208
 * 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, 6208, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6209
 *     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":6210
 *     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":6211
 *     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__300, 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 __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":6209
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6212
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_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":6213
 *             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":6207
 * 
 * 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":6206
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphReleaseUserObject(__pyx_t_4cuda_5ccuda_CUgraph __pyx_v_graph, __pyx_t_4cuda_5ccuda_CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6215, 1, __PYX_ERR(0, 6215, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6216
 * 
 * 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":6217
 * 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, 6217, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6218
 *     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":6219
 *     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":6220
 *     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__301, 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 __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":6218
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6221
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int) nogil> __cuGraphReleaseUserObject)(graph, object, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUuserObject, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject)(__pyx_v_graph, __pyx_v_object, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":6222
 *             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":6216
 * 
 * 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":6215
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, __pyx_t_4cuda_5ccuda_CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6224, 1, __PYX_ERR(0, 6224, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6225
 * 
 * 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":6226
 * 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, 6226, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6227
 *     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":6228
 *     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":6229
 *     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__302, 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 __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":6227
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6230
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, __pyx_t_4cuda_5ccuda_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":6231
 *             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":6225
 * 
 * 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":6224
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, __pyx_t_4cuda_5ccuda_CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6233, 1, __PYX_ERR(0, 6233, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6234
 * 
 * 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":6235
 * 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, 6235, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6236
 *     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":6237
 *     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":6238
 *     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__303, 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 __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":6236
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6239
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, __pyx_t_4cuda_5ccuda_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":6240
 *             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":6234
 * 
 * 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":6233
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSize(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, __pyx_t_4cuda_5ccuda_CUfunction __pyx_v_func, __pyx_t_4cuda_5ccuda_CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6242, 1, __PYX_ERR(0, 6242, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6243
 * 
 * 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":6244
 * 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, 6244, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6245
 *     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":6246
 *     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":6247
 *     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__304, 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 __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":6245
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6248
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, int *, __pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_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":6249
 *             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":6243
 * 
 * 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":6242
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSizeWithFlags(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, __pyx_t_4cuda_5ccuda_CUfunction __pyx_v_func, __pyx_t_4cuda_5ccuda_CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6251, 1, __PYX_ERR(0, 6251, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6252
 * 
 * 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":6253
 * 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, 6253, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6254
 *     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":6255
 *     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":6256
 *     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__305, 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 __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":6254
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6257
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, int *, __pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_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":6258
 *             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":6252
 * 
 * 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":6251
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, __pyx_t_4cuda_5ccuda_CUfunction __pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6260, 1, __PYX_ERR(0, 6260, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6261
 * 
 * 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":6262
 * 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, 6262, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6263
 *     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":6264
 *     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":6265
 *     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__306, 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 __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":6263
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6266
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(size_t *, __pyx_t_4cuda_5ccuda_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":6267
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 *     err = (<CUresult (*)(size_t*, CUfunction, int, int) nogil> __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize)
 *     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":6261
 * 
 * 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":6260
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6269, 1, __PYX_ERR(0, 6269, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6270
 * 
 * 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":6271
 * 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, 6271, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6272
 *     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":6273
 *     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":6274
 *     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__307, 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 __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":6272
 *     global __cuTexRefSetArray
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6275
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray, unsigned int) nogil> __cuTexRefSetArray)(hTexRef, hArray, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUarray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray)(__pyx_v_hTexRef, __pyx_v_hArray, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":6276
 *             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":6270
 * 
 * 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":6269
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, __pyx_t_4cuda_5ccuda_CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6278, 1, __PYX_ERR(0, 6278, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6279
 * 
 * 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":6280
 * 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, 6280, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6281
 *     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":6282
 *     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":6283
 *     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__308, 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 __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":6281
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6284
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUmipmappedArray, unsigned int) nogil> __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUmipmappedArray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray)(__pyx_v_hTexRef, __pyx_v_hMipmappedArray, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":6285
 *             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":6279
 * 
 * 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":6278
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress_v2(size_t *__pyx_v_ByteOffset, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr, size_t __pyx_v_numbytes) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6287, 1, __PYX_ERR(0, 6287, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6288
 * 
 * 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":6289
 * 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, 6289, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6290
 *     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":6291
 *     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":6292
 *     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__309, 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 __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":6290
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6293
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(size_t *, __pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_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":6294
 *             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":6288
 * 
 * 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":6287
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress2D_v3(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR const *__pyx_v_desc, __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_v_dptr, size_t __pyx_v_Pitch) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6296, 1, __PYX_ERR(0, 6296, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6297
 * 
 * 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":6298
 * 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, 6298, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6299
 *     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":6300
 *     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":6301
 *     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__310, 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 __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":6299
 *     global __cuTexRefSetAddress2D_v3
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6302
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR const *, __pyx_t_4cuda_5ccuda_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":6303
 *             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":6297
 * 
 * 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":6296
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFormat
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_fmt, int __pyx_v_NumPackedComponents) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6305, 1, __PYX_ERR(0, 6305, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6306
 * 
 * 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":6307
 * 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, 6307, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6308
 *     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":6309
 *     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":6310
 *     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__311, 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 __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":6308
 *     global __cuTexRefSetFormat
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6311
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray_format, int) nogil> __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUarray_format, int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat)(__pyx_v_hTexRef, __pyx_v_fmt, __pyx_v_NumPackedComponents);

    /* "cuda/_cuda/ccuda.pyx":6312
 *             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":6306
 * 
 * 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":6305
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, int __pyx_v_dim, __pyx_t_4cuda_5ccuda_CUaddress_mode __pyx_v_am) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6314, 1, __PYX_ERR(0, 6314, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6315
 * 
 * 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":6316
 * 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, 6316, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6317
 *     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":6318
 *     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":6319
 *     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__312, 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 __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":6317
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6320
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 *     err = (<CUresult (*)(CUtexref, int, CUaddress_mode) nogil> __cuTexRefSetAddressMode)(hTexRef, dim, am)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, int, __pyx_t_4cuda_5ccuda_CUaddress_mode))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode)(__pyx_v_hTexRef, __pyx_v_dim, __pyx_v_am);

    /* "cuda/_cuda/ccuda.pyx":6321
 *             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":6315
 * 
 * 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":6314
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, __pyx_t_4cuda_5ccuda_CUfilter_mode __pyx_v_fm) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6323, 1, __PYX_ERR(0, 6323, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6324
 * 
 * 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":6325
 * 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, 6325, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6326
 *     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":6327
 *     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":6328
 *     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__313, 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 __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":6326
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6329
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUfilter_mode))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode)(__pyx_v_hTexRef, __pyx_v_fm);

    /* "cuda/_cuda/ccuda.pyx":6330
 *             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":6324
 * 
 * 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":6323
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, __pyx_t_4cuda_5ccuda_CUfilter_mode __pyx_v_fm) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6332, 1, __PYX_ERR(0, 6332, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6333
 * 
 * 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":6334
 * 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, 6334, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6335
 *     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":6336
 *     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":6337
 *     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__314, 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 __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":6335
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6338
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUfilter_mode))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode)(__pyx_v_hTexRef, __pyx_v_fm);

    /* "cuda/_cuda/ccuda.pyx":6339
 *             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":6333
 * 
 * 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":6332
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, float __pyx_v_bias) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6341, 1, __PYX_ERR(0, 6341, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6342
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6343
 * 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, 6343, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6344
 *     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":6345
 *     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":6346
 *     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__315, 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 __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":6344
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6347
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, float))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias)(__pyx_v_hTexRef, __pyx_v_bias);

    /* "cuda/_cuda/ccuda.pyx":6348
 *             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":6342
 * 
 * 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":6341
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, float __pyx_v_minMipmapLevelClamp, float __pyx_v_maxMipmapLevelClamp) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6350, 1, __PYX_ERR(0, 6350, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6351
 * 
 * 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":6352
 * 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, 6352, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6353
 *     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":6354
 *     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":6355
 *     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__316, 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 __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":6353
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6356
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(CUtexref, float, float) nogil> __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, float, float))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp)(__pyx_v_hTexRef, __pyx_v_minMipmapLevelClamp, __pyx_v_maxMipmapLevelClamp);

    /* "cuda/_cuda/ccuda.pyx":6357
 *             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":6351
 * 
 * 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":6350
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_maxAniso) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6359, 1, __PYX_ERR(0, 6359, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6360
 * 
 * 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":6361
 * 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, 6361, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6362
 *     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":6363
 *     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":6364
 *     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__317, 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 __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":6362
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6365
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy)(__pyx_v_hTexRef, __pyx_v_maxAniso);

    /* "cuda/_cuda/ccuda.pyx":6366
 *             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":6360
 * 
 * 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":6359
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, float *__pyx_v_pBorderColor) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6368, 1, __PYX_ERR(0, 6368, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6369
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6370
 * 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, 6370, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6371
 *     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":6372
 *     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":6373
 *     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__318, 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 __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":6371
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6374
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, float *))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor)(__pyx_v_hTexRef, __pyx_v_pBorderColor);

    /* "cuda/_cuda/ccuda.pyx":6375
 *             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":6369
 * 
 * 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":6368
 *     return err
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6377, 1, __PYX_ERR(0, 6377, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6378
 * 
 * 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":6379
 * 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, 6379, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6380
 *     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":6381
 *     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":6382
 *     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__319, 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 __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":6380
 *     global __cuTexRefSetFlags
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6383
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags)(__pyx_v_hTexRef, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":6384
 *             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":6378
 * 
 * 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":6377
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddress_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_pdptr, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6386, 1, __PYX_ERR(0, 6386, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6387
 * 
 * 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":6388
 * 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, 6388, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6389
 *     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":6390
 *     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":6391
 *     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__320, 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 __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":6389
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6392
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUtexref) nogil> __cuTexRefGetAddress_v2)(pdptr, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2)(__pyx_v_pdptr, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6393
 *             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":6387
 * 
 * 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":6386
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray(__pyx_t_4cuda_5ccuda_CUarray *__pyx_v_phArray, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6395, 1, __PYX_ERR(0, 6395, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6396
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6397
 * 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, 6397, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6398
 *     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":6399
 *     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":6400
 *     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__321, 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 __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":6398
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6401
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray)(__pyx_v_phArray, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6402
 *             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":6396
 * 
 * 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":6395
 *     return err
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray(__pyx_t_4cuda_5ccuda_CUmipmappedArray *__pyx_v_phMipmappedArray, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6404, 1, __PYX_ERR(0, 6404, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6405
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6406
 * 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, 6406, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6407
 *     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":6408
 *     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":6409
 *     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__322, 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 __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":6407
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6410
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray)(__pyx_v_phMipmappedArray, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6411
 *             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":6405
 * 
 * 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":6404
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode(__pyx_t_4cuda_5ccuda_CUaddress_mode *__pyx_v_pam, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef, int __pyx_v_dim) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6413, 1, __PYX_ERR(0, 6413, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6414
 * 
 * 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":6415
 * 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, 6415, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6416
 *     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":6417
 *     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":6418
 *     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__323, 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 __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":6416
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6419
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 *     err = (<CUresult (*)(CUaddress_mode*, CUtexref, int) nogil> __cuTexRefGetAddressMode)(pam, hTexRef, dim)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUaddress_mode *, __pyx_t_4cuda_5ccuda_CUtexref, int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode)(__pyx_v_pam, __pyx_v_hTexRef, __pyx_v_dim);

    /* "cuda/_cuda/ccuda.pyx":6420
 *             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":6414
 * 
 * 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":6413
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode(__pyx_t_4cuda_5ccuda_CUfilter_mode *__pyx_v_pfm, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6422, 1, __PYX_ERR(0, 6422, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6423
 * 
 * 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":6424
 * 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, 6424, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6425
 *     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":6426
 *     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":6427
 *     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__324, 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 __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":6425
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6428
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfilter_mode *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode)(__pyx_v_pfm, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6429
 *             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":6423
 * 
 * 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":6422
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFormat
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat(__pyx_t_4cuda_5ccuda_CUarray_format *__pyx_v_pFormat, int *__pyx_v_pNumChannels, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6431, 1, __PYX_ERR(0, 6431, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6432
 * 
 * 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":6433
 * 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, 6433, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6434
 *     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":6435
 *     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":6436
 *     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__325, 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 __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":6434
 *     global __cuTexRefGetFormat
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6437
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 *     err = (<CUresult (*)(CUarray_format*, int*, CUtexref) nogil> __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray_format *, int *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat)(__pyx_v_pFormat, __pyx_v_pNumChannels, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6438
 *             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":6432
 * 
 * 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":6431
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode(__pyx_t_4cuda_5ccuda_CUfilter_mode *__pyx_v_pfm, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6440, 1, __PYX_ERR(0, 6440, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6441
 * 
 * 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":6442
 * 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, 6442, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6443
 *     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":6444
 *     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":6445
 *     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__326, 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 __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":6443
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6446
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUfilter_mode *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode)(__pyx_v_pfm, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6447
 *             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":6441
 * 
 * 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":6440
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias(float *__pyx_v_pbias, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6449, 1, __PYX_ERR(0, 6449, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6450
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6451
 * 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, 6451, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6452
 *     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":6453
 *     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":6454
 *     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__327, 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 __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":6452
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6455
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(float *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias)(__pyx_v_pbias, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6456
 *             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":6450
 * 
 * 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":6449
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp(float *__pyx_v_pminMipmapLevelClamp, float *__pyx_v_pmaxMipmapLevelClamp, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6458, 1, __PYX_ERR(0, 6458, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6459
 * 
 * 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":6460
 * 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, 6460, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6461
 *     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":6462
 *     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":6463
 *     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__328, 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 __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":6461
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6464
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(float*, float*, CUtexref) nogil> __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(float *, float *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp)(__pyx_v_pminMipmapLevelClamp, __pyx_v_pmaxMipmapLevelClamp, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6465
 *             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":6459
 * 
 * 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":6458
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy(int *__pyx_v_pmaxAniso, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6467, 1, __PYX_ERR(0, 6467, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6468
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMaxAnisotropy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6469
 * 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, 6469, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6470
 *     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":6471
 *     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":6472
 *     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__329, 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 __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":6470
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6473
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy)(__pyx_v_pmaxAniso, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6474
 *             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":6468
 * 
 * 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":6467
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor(float *__pyx_v_pBorderColor, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6476, 1, __PYX_ERR(0, 6476, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6477
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6478
 * 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, 6478, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6479
 *     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":6480
 *     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":6481
 *     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__330, 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 __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":6479
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6482
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(float *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor)(__pyx_v_pBorderColor, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6483
 *             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":6477
 * 
 * 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":6476
 *     return err
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags(unsigned int *__pyx_v_pFlags, __pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6485, 1, __PYX_ERR(0, 6485, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6486
 * 
 * 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":6487
 * 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, 6487, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6488
 *     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":6489
 *     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":6490
 *     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__331, 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 __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":6488
 *     global __cuTexRefGetFlags
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6491
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int *, __pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags)(__pyx_v_pFlags, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6492
 *             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":6486
 * 
 * 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":6485
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate(__pyx_t_4cuda_5ccuda_CUtexref *__pyx_v_pTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6494, 1, __PYX_ERR(0, 6494, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6495
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6496
 * 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, 6496, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6497
 *     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":6498
 *     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":6499
 *     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__332, 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 __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":6497
 *     global __cuTexRefCreate
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6500
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref *))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate)(__pyx_v_pTexRef);

    /* "cuda/_cuda/ccuda.pyx":6501
 *             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":6495
 * 
 * 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":6494
 *     return err
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy(__pyx_t_4cuda_5ccuda_CUtexref __pyx_v_hTexRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6503, 1, __PYX_ERR(0, 6503, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6504
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6505
 * 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, 6505, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6506
 *     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":6507
 *     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":6508
 *     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__333, 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 __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":6506
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6509
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy)(__pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6510
 *             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":6504
 * 
 * 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":6503
 *     return err
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuSurfRefSetArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray(__pyx_t_4cuda_5ccuda_CUsurfref __pyx_v_hSurfRef, __pyx_t_4cuda_5ccuda_CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6512, 1, __PYX_ERR(0, 6512, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6513
 * 
 * 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":6514
 * 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, 6514, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6515
 *     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":6516
 *     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":6517
 *     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__334, 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 __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":6515
 *     global __cuSurfRefSetArray
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6518
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 *     err = (<CUresult (*)(CUsurfref, CUarray, unsigned int) nogil> __cuSurfRefSetArray)(hSurfRef, hArray, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUsurfref, __pyx_t_4cuda_5ccuda_CUarray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray)(__pyx_v_hSurfRef, __pyx_v_hArray, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":6519
 *             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":6513
 * 
 * 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":6512
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray(__pyx_t_4cuda_5ccuda_CUarray *__pyx_v_phArray, __pyx_t_4cuda_5ccuda_CUsurfref __pyx_v_hSurfRef) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6521, 1, __PYX_ERR(0, 6521, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6522
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6523
 * 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, 6523, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6524
 *     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":6525
 *     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":6526
 *     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__335, 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 __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":6524
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6527
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUsurfref))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray)(__pyx_v_phArray, __pyx_v_hSurfRef);

    /* "cuda/_cuda/ccuda.pyx":6528
 *             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":6522
 * 
 * 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":6521
 *     return err
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate(__pyx_t_4cuda_5ccuda_CUtexObject *__pyx_v_pTexObject, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC const *__pyx_v_pResDesc, __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC const *__pyx_v_pTexDesc, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC const *__pyx_v_pResViewDesc) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6530, 1, __PYX_ERR(0, 6530, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6531
 * 
 * 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":6532
 * 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, 6532, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6533
 *     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":6534
 *     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":6535
 *     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__336, 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 __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":6533
 *     global __cuTexObjectCreate
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6536
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexObject *, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC const *, __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC const *, __pyx_t_4cuda_5ccuda_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":6537
 *             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":6531
 * 
 * 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":6530
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectDestroy(__pyx_t_4cuda_5ccuda_CUtexObject __pyx_v_texObject) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6539, 1, __PYX_ERR(0, 6539, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6540
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6541
 * 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, 6541, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6542
 *     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":6543
 *     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":6544
 *     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__337, 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 __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":6542
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6545
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUtexObject))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy)(__pyx_v_texObject);

    /* "cuda/_cuda/ccuda.pyx":6546
 *             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":6540
 * 
 * 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":6539
 *     return err
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc(__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc, __pyx_t_4cuda_5ccuda_CUtexObject __pyx_v_texObject) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6548, 1, __PYX_ERR(0, 6548, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6549
 * 
 * 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":6550
 * 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, 6550, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6551
 *     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":6552
 *     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":6553
 *     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__338, 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 __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":6551
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6554
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceDesc)(pResDesc, texObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *, __pyx_t_4cuda_5ccuda_CUtexObject))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc)(__pyx_v_pResDesc, __pyx_v_texObject);

    /* "cuda/_cuda/ccuda.pyx":6555
 *             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":6549
 * 
 * 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":6548
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc(__pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC *__pyx_v_pTexDesc, __pyx_t_4cuda_5ccuda_CUtexObject __pyx_v_texObject) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6557, 1, __PYX_ERR(0, 6557, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6558
 * 
 * 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":6559
 * 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, 6559, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6560
 *     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":6561
 *     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":6562
 *     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__339, 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 __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":6560
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6563
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 *     err = (<CUresult (*)(CUDA_TEXTURE_DESC*, CUtexObject) nogil> __cuTexObjectGetTextureDesc)(pTexDesc, texObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC *, __pyx_t_4cuda_5ccuda_CUtexObject))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc)(__pyx_v_pTexDesc, __pyx_v_texObject);

    /* "cuda/_cuda/ccuda.pyx":6564
 *             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":6558
 * 
 * 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":6557
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc(__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc, __pyx_t_4cuda_5ccuda_CUtexObject __pyx_v_texObject) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6566, 1, __PYX_ERR(0, 6566, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6567
 * 
 * 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":6568
 * 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, 6568, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6569
 *     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":6570
 *     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":6571
 *     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__340, 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 __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":6569
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6572
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_VIEW_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC *, __pyx_t_4cuda_5ccuda_CUtexObject))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc)(__pyx_v_pResViewDesc, __pyx_v_texObject);

    /* "cuda/_cuda/ccuda.pyx":6573
 *             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":6567
 * 
 * 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":6566
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectCreate
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate(__pyx_t_4cuda_5ccuda_CUsurfObject *__pyx_v_pSurfObject, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC const *__pyx_v_pResDesc) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6575, 1, __PYX_ERR(0, 6575, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6576
 * 
 * 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":6577
 * 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, 6577, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6578
 *     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":6579
 *     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":6580
 *     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__341, 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 __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":6578
 *     global __cuSurfObjectCreate
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6581
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 *     err = (<CUresult (*)(CUsurfObject*, const CUDA_RESOURCE_DESC*) nogil> __cuSurfObjectCreate)(pSurfObject, pResDesc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUsurfObject *, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate)(__pyx_v_pSurfObject, __pyx_v_pResDesc);

    /* "cuda/_cuda/ccuda.pyx":6582
 *             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":6576
 * 
 * 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":6575
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectDestroy(__pyx_t_4cuda_5ccuda_CUsurfObject __pyx_v_surfObject) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6584, 1, __PYX_ERR(0, 6584, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6585
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6586
 * 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, 6586, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6587
 *     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":6588
 *     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":6589
 *     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__342, 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 __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":6587
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6590
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUsurfObject))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy)(__pyx_v_surfObject);

    /* "cuda/_cuda/ccuda.pyx":6591
 *             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":6585
 * 
 * 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":6584
 *     return err
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc(__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc, __pyx_t_4cuda_5ccuda_CUsurfObject __pyx_v_surfObject) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6593, 1, __PYX_ERR(0, 6593, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6594
 * 
 * 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":6595
 * 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, 6595, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6596
 *     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":6597
 *     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":6598
 *     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__343, 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 __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":6596
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6599
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUsurfObject) nogil> __cuSurfObjectGetResourceDesc)(pResDesc, surfObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *, __pyx_t_4cuda_5ccuda_CUsurfObject))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc)(__pyx_v_pResDesc, __pyx_v_surfObject);

    /* "cuda/_cuda/ccuda.pyx":6600
 *             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":6594
 * 
 * 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":6593
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dev, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_peerDev) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6602, 1, __PYX_ERR(0, 6602, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6603
 * 
 * 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":6604
 * 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, 6604, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6605
 *     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":6606
 *     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":6607
 *     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__344, 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 __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":6605
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6608
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 *     err = (<CUresult (*)(int*, CUdevice, CUdevice) nogil> __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, __pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer)(__pyx_v_canAccessPeer, __pyx_v_dev, __pyx_v_peerDev);

    /* "cuda/_cuda/ccuda.pyx":6609
 *             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":6603
 * 
 * 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":6602
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess(__pyx_t_4cuda_5ccuda_CUcontext __pyx_v_peerContext, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6611, 1, __PYX_ERR(0, 6611, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6612
 * 
 * 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":6613
 * 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, 6613, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6614
 *     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":6615
 *     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":6616
 *     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__345, 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 __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":6614
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6617
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess)(__pyx_v_peerContext, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":6618
 *             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":6612
 * 
 * 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":6611
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess(__pyx_t_4cuda_5ccuda_CUcontext __pyx_v_peerContext) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6620, 1, __PYX_ERR(0, 6620, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6621
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxDisablePeerAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6622
 * 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, 6622, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6623
 *     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":6624
 *     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":6625
 *     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__346, 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 __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":6623
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6626
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess)(__pyx_v_peerContext);

    /* "cuda/_cuda/ccuda.pyx":6627
 *             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":6621
 * 
 * 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":6620
 *     return err
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute(int *__pyx_v_value, __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute __pyx_v_attrib, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_srcDevice, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_dstDevice) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6629, 1, __PYX_ERR(0, 6629, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6630
 * 
 * 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":6631
 * 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, 6631, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6632
 *     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":6633
 *     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":6634
 *     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__347, 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 __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":6632
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6635
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(int *, __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute, __pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute)(__pyx_v_value, __pyx_v_attrib, __pyx_v_srcDevice, __pyx_v_dstDevice);

    /* "cuda/_cuda/ccuda.pyx":6636
 *             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":6630
 * 
 * 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":6629
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource(__pyx_t_4cuda_5ccuda_CUgraphicsResource __pyx_v_resource) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6638, 1, __PYX_ERR(0, 6638, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6639
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsUnregisterResource             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6640
 * 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, 6640, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6641
 *     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":6642
 *     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":6643
 *     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__348, 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 __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":6641
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6644
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphicsResource))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource)(__pyx_v_resource);

    /* "cuda/_cuda/ccuda.pyx":6645
 *             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":6639
 * 
 * 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":6638
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray(__pyx_t_4cuda_5ccuda_CUarray *__pyx_v_pArray, __pyx_t_4cuda_5ccuda_CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6647, 1, __PYX_ERR(0, 6647, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6648
 * 
 * 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":6649
 * 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, 6649, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6650
 *     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":6651
 *     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":6652
 *     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__349, 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 __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":6650
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6653
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_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":6654
 *             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":6648
 * 
 * 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":6647
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedMipmappedArray(__pyx_t_4cuda_5ccuda_CUmipmappedArray *__pyx_v_pMipmappedArray, __pyx_t_4cuda_5ccuda_CUgraphicsResource __pyx_v_resource) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6656, 1, __PYX_ERR(0, 6656, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6657
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsResourceGetMappedMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6658
 * 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, 6658, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6659
 *     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":6660
 *     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":6661
 *     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__350, 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 __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":6659
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6662
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_CUgraphicsResource))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray)(__pyx_v_pMipmappedArray, __pyx_v_resource);

    /* "cuda/_cuda/ccuda.pyx":6663
 *             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":6657
 * 
 * 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":6656
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2(__pyx_t_4cuda_5ccuda_CUdeviceptr *__pyx_v_pDevPtr, size_t *__pyx_v_pSize, __pyx_t_4cuda_5ccuda_CUgraphicsResource __pyx_v_resource) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6665, 1, __PYX_ERR(0, 6665, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6666
 * 
 * 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":6667
 * 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, 6667, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6668
 *     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":6669
 *     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":6670
 *     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__351, 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 __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":6668
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6671
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t *, __pyx_t_4cuda_5ccuda_CUgraphicsResource))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2)(__pyx_v_pDevPtr, __pyx_v_pSize, __pyx_v_resource);

    /* "cuda/_cuda/ccuda.pyx":6672
 *             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":6666
 * 
 * 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":6665
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2(__pyx_t_4cuda_5ccuda_CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6674, 1, __PYX_ERR(0, 6674, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6675
 * 
 * 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":6676
 * 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, 6676, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6677
 *     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":6678
 *     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":6679
 *     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__352, 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 __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":6677
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6680
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 *     err = (<CUresult (*)(CUgraphicsResource, unsigned int) nogil> __cuGraphicsResourceSetMapFlags_v2)(resource, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUgraphicsResource, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2)(__pyx_v_resource, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6681
 *             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":6675
 * 
 * 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":6674
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsMapResources
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources(unsigned int __pyx_v_count, __pyx_t_4cuda_5ccuda_CUgraphicsResource *__pyx_v_resources, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6683, 1, __PYX_ERR(0, 6683, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6684
 * 
 * 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":6685
 * 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, 6685, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6686
 *     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":6687
 *     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":6688
 *     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__353, 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 __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":6686
 *     global __cuGraphicsMapResources
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6689
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsMapResources)(count, resources, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int, __pyx_t_4cuda_5ccuda_CUgraphicsResource *, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources)(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":6690
 *             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":6684
 * 
 * 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":6683
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources(unsigned int __pyx_v_count, __pyx_t_4cuda_5ccuda_CUgraphicsResource *__pyx_v_resources, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_hStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6692, 1, __PYX_ERR(0, 6692, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6693
 * 
 * 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":6694
 * 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, 6694, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6695
 *     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":6696
 *     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":6697
 *     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__354, 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 __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":6695
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6698
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsUnmapResources)(count, resources, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int, __pyx_t_4cuda_5ccuda_CUgraphicsResource *, __pyx_t_4cuda_5ccuda_CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources)(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":6699
 *             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":6693
 * 
 * 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":6692
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGetProcAddress
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(char const *__pyx_v_symbol, void **__pyx_v_pfn, int __pyx_v_cudaVersion, __pyx_t_4cuda_5ccuda_cuuint64_t __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6701, 1, __PYX_ERR(0, 6701, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6702
 * 
 * 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":6703
 * 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, 6703, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6704
 *     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":6705
 *     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":6706
 *     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__355, 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 __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":6704
 *     global __cuGetProcAddress
 *     cuPythonInit()
 *     if __cuGetProcAddress == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6707
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(char const *, void **, int, __pyx_t_4cuda_5ccuda_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":6708
 *             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":6702
 * 
 * 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":6701
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGetExportTable
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable(void const **__pyx_v_ppExportTable, __pyx_t_4cuda_5ccuda_CUuuid const *__pyx_v_pExportTableId) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6710, 1, __PYX_ERR(0, 6710, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6711
 * 
 * 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":6712
 * 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, 6712, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6713
 *     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":6714
 *     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":6715
 *     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__356, 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 __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":6713
 *     global __cuGetExportTable
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6716
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void const **, __pyx_t_4cuda_5ccuda_CUuuid const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable)(__pyx_v_ppExportTable, __pyx_v_pExportTableId);

    /* "cuda/_cuda/ccuda.pyx":6717
 *             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":6711
 * 
 * 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":6710
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuProfilerInitialize
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerInitialize(char const *__pyx_v_configFile, char const *__pyx_v_outputFile, __pyx_t_4cuda_5ccuda_CUoutput_mode __pyx_v_outputMode) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6719, 1, __PYX_ERR(0, 6719, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6720
 * 
 * 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":6721
 * 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, 6721, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6722
 *     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":6723
 *     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":6724
 *     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__357, 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 __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":6722
 *     global __cuProfilerInitialize
 *     cuPythonInit()
 *     if __cuProfilerInitialize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6725
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(char const *, char const *, __pyx_t_4cuda_5ccuda_CUoutput_mode))__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerInitialize)(__pyx_v_configFile, __pyx_v_outputFile, __pyx_v_outputMode);

    /* "cuda/_cuda/ccuda.pyx":6726
 *             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":6720
 * 
 * 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":6719
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuProfilerStart
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart(void) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6728, 1, __PYX_ERR(0, 6728, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":6730
 * 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, 6730, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6731
 *     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":6732
 *     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":6733
 *     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__358, 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 __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":6731
 *     global __cuProfilerStart
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6734
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void))__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart)();

    /* "cuda/_cuda/ccuda.pyx":6735
 *             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":6729
 * 
 * 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":6728
 *     return err
 * 
 * cdef CUresult _cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuProfilerStart
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuProfilerStop
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop(void) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6737, 1, __PYX_ERR(0, 6737, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":6739
 * 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, 6739, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6740
 *     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":6741
 *     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":6742
 *     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__359, 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 __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":6740
 *     global __cuProfilerStop
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6743
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(void))__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop)();

    /* "cuda/_cuda/ccuda.pyx":6744
 *             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":6738
 * 
 * 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":6737
 *     return err
 * 
 * cdef CUresult _cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuProfilerStop
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuVDPAUGetDevice
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice(__pyx_t_4cuda_5ccuda_CUdevice *__pyx_v_pDevice, __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6746, 1, __PYX_ERR(0, 6746, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6747
 * 
 * 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":6748
 * 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, 6748, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6749
 *     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":6750
 *     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":6751
 *     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__360, 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 __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":6749
 *     global __cuVDPAUGetDevice
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6752
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":6753
 *             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":6747
 * 
 * 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":6746
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuVDPAUCtxCreate_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUCtxCreate_v2(__pyx_t_4cuda_5ccuda_CUcontext *__pyx_v_pCtx, unsigned int __pyx_v_flags, __pyx_t_4cuda_5ccuda_CUdevice __pyx_v_device, __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6755, 1, __PYX_ERR(0, 6755, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6756
 * 
 * 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":6757
 * 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, 6757, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6758
 *     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":6759
 *     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":6760
 *     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__361, 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 __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":6758
 *     global __cuVDPAUCtxCreate_v2
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6761
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUcontext *, unsigned int, __pyx_t_4cuda_5ccuda_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":6762
 *             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":6756
 * 
 * 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":6755
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsVDPAURegisterVideoSurface
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterVideoSurface(__pyx_t_4cuda_5ccuda_CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_VdpVideoSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6764, 1, __PYX_ERR(0, 6764, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6765
 * 
 * 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":6766
 * 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, 6766, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6767
 *     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":6768
 *     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":6769
 *     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__362, 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 __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":6767
 *     global __cuGraphicsVDPAURegisterVideoSurface
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6770
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpVideoSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":6771
 *             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":6765
 * 
 * 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":6764
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsVDPAURegisterOutputSurface
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterOutputSurface(__pyx_t_4cuda_5ccuda_CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_VdpOutputSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6773, 1, __PYX_ERR(0, 6773, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6774
 * 
 * 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":6775
 * 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, 6775, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6776
 *     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":6777
 *     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":6778
 *     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__363, 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 __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":6776
 *     global __cuGraphicsVDPAURegisterOutputSurface
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6779
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpOutputSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":6780
 *             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":6774
 * 
 * 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":6773
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsEGLRegisterImage
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsEGLRegisterImage(__pyx_t_4cuda_5ccuda_CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_EGLImageKHR __pyx_v_image, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6782, 1, __PYX_ERR(0, 6782, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6783
 * 
 * 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":6784
 * 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, 6784, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6785
 *     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":6786
 *     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":6787
 *     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__364, 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 __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":6785
 *     global __cuGraphicsEGLRegisterImage
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6788
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, EGLImageKHR, unsigned int) nogil> __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":6789
 *             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":6783
 * 
 * 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":6782
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6791, 1, __PYX_ERR(0, 6791, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6792
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamConsumerConnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6793
 * 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, 6793, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6794
 *     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":6795
 *     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":6796
 *     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__365, 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 __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":6794
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6797
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_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":6798
 *             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":6792
 * 
 * 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":6791
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerConnectWithFlags
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_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) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6800, 1, __PYX_ERR(0, 6800, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6801
 * 
 * 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":6802
 * 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, 6802, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6803
 *     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":6804
 *     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":6805
 *     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__366, 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 __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":6803
 *     global __cuEGLStreamConsumerConnectWithFlags
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6806
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, unsigned int) nogil> __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_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":6807
 *             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":6801
 * 
 * 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":6800
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerDisconnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6809, 1, __PYX_ERR(0, 6809, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6810
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamConsumerDisconnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6811
 * 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, 6811, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6812
 *     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":6813
 *     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":6814
 *     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__367, 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 __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":6812
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6815
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect)(__pyx_v_conn);

    /* "cuda/_cuda/ccuda.pyx":6816
 *             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":6810
 * 
 * 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":6809
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerAcquireFrame
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerAcquireFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_CUstream *__pyx_v_pStream, unsigned int __pyx_v_timeout) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6818, 1, __PYX_ERR(0, 6818, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6819
 * 
 * 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":6820
 * 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, 6820, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6821
 *     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":6822
 *     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":6823
 *     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__368, 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 __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":6821
 *     global __cuEGLStreamConsumerAcquireFrame
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6824
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUgraphicsResource *, __pyx_t_4cuda_5ccuda_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":6825
 *             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":6819
 * 
 * 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":6818
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerReleaseFrame
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUgraphicsResource __pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_CUstream *__pyx_v_pStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6827, 1, __PYX_ERR(0, 6827, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6828
 * 
 * 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":6829
 * 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, 6829, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6830
 *     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":6831
 *     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":6832
 *     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__369, 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 __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":6830
 *     global __cuEGLStreamConsumerReleaseFrame
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6833
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource, CUstream*) nogil> __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUgraphicsResource, __pyx_t_4cuda_5ccuda_CUstream *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame)(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream);

    /* "cuda/_cuda/ccuda.pyx":6834
 *             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":6828
 * 
 * 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":6827
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerConnect
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_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) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6836, 1, __PYX_ERR(0, 6836, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6837
 * 
 * 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":6838
 * 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, 6838, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6839
 *     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":6840
 *     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":6841
 *     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__370, 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 __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":6839
 *     global __cuEGLStreamProducerConnect
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6842
 *         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 = ((__pyx_t_4cuda_5ccuda_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":6843
 *             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":6837
 * 
 * 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":6836
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerDisconnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6845, 1, __PYX_ERR(0, 6845, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6846
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamProducerDisconnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6847
 * 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, 6847, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6848
 *     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":6849
 *     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":6850
 *     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__371, 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 __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":6848
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6851
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect)(__pyx_v_conn);

    /* "cuda/_cuda/ccuda.pyx":6852
 *             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":6846
 * 
 * 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":6845
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerPresentFrame
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerPresentFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUeglFrame __pyx_v_eglframe, __pyx_t_4cuda_5ccuda_CUstream *__pyx_v_pStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6854, 1, __PYX_ERR(0, 6854, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6855
 * 
 * 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":6856
 * 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, 6856, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6857
 *     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":6858
 *     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":6859
 *     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__372, 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 __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":6857
 *     global __cuEGLStreamProducerPresentFrame
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6860
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame, CUstream*) nogil> __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, __pyx_t_4cuda_5ccuda_CUstream *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame)(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream);

    /* "cuda/_cuda/ccuda.pyx":6861
 *             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":6855
 * 
 * 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":6854
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerReturnFrame
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_eglframe, __pyx_t_4cuda_5ccuda_CUstream *__pyx_v_pStream) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6863, 1, __PYX_ERR(0, 6863, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6864
 * 
 * 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":6865
 * 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, 6865, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6866
 *     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":6867
 *     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":6868
 *     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__373, 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 __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":6866
 *     global __cuEGLStreamProducerReturnFrame
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6869
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame*, CUstream*) nogil> __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, __pyx_t_4cuda_5ccuda_CUstream *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame)(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream);

    /* "cuda/_cuda/ccuda.pyx":6870
 *             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":6864
 * 
 * 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":6863
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedEglFrame
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame(__pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_eglFrame, __pyx_t_4cuda_5ccuda_CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6872, 1, __PYX_ERR(0, 6872, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6873
 * 
 * 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":6874
 * 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, 6874, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6875
 *     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":6876
 *     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":6877
 *     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__374, 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 __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":6875
 *     global __cuGraphicsResourceGetMappedEglFrame
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6878
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglFrame *, __pyx_t_4cuda_5ccuda_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":6879
 *             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":6873
 * 
 * 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":6872
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuEventCreateFromEGLSync
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventCreateFromEGLSync(__pyx_t_4cuda_5ccuda_CUevent *__pyx_v_phEvent, __pyx_t_4cuda_5ccuda_EGLSyncKHR __pyx_v_eglSync, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6881, 1, __PYX_ERR(0, 6881, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6882
 * 
 * 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":6883
 * 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, 6883, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6884
 *     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":6885
 *     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":6886
 *     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__375, 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 __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":6884
 *     global __cuEventCreateFromEGLSync
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6887
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 *     err = (<CUresult (*)(CUevent*, EGLSyncKHR, unsigned int) nogil> __cuEventCreateFromEGLSync)(phEvent, eglSync, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":6888
 *             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":6882
 * 
 * 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":6881
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsGLRegisterBuffer
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterBuffer(__pyx_t_4cuda_5ccuda_CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_GLuint __pyx_v_buffer, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6890, 1, __PYX_ERR(0, 6890, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6891
 * 
 * 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":6892
 * 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, 6892, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6893
 *     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":6894
 *     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":6895
 *     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__376, 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 __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":6893
 *     global __cuGraphicsGLRegisterBuffer
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6896
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, unsigned int) nogil> __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":6897
 *             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":6891
 * 
 * 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":6890
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsGLRegisterImage
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterImage(__pyx_t_4cuda_5ccuda_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) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6899, 1, __PYX_ERR(0, 6899, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6900
 * 
 * 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":6901
 * 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, 6901, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6902
 *     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":6903
 *     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":6904
 *     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__377, 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 __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":6902
 *     global __cuGraphicsGLRegisterImage
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6905
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(__pyx_t_4cuda_5ccuda_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":6906
 *             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":6900
 * 
 * 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":6899
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND;
  __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 _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGLGetDevices_v2
 *     cuPythonInit()
 */

static __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGLGetDevices_v2(unsigned int *__pyx_v_pCudaDeviceCount, __pyx_t_4cuda_5ccuda_CUdevice *__pyx_v_pCudaDevices, unsigned int __pyx_v_cudaDeviceCount, __pyx_t_4cuda_5ccuda_CUGLDeviceList __pyx_v_deviceList) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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], 6908, 1, __PYX_ERR(0, 6908, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6909
 * 
 * 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":6910
 * 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, 6910, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6911
 *     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":6912
 *     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":6913
 *     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__378, 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 __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":6911
 *     global __cuGLGetDevices_v2
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6914
 *         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 = ((__pyx_t_4cuda_5ccuda_CUresult (*)(unsigned int *, __pyx_t_4cuda_5ccuda_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":6915
 *             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":6909
 * 
 * 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":6908
 *     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 __pyx_t_4cuda_5ccuda_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 = __pyx_e_4cuda_5ccuda_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_dlopen_libcuda_so, __pyx_k_Failed_to_dlopen_libcuda_so, sizeof(__pyx_k_Failed_to_dlopen_libcuda_so), 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_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_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_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_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_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_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_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_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_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_cuStreamWaitValue64_not, __pyx_k_Function_cuStreamWaitValue64_not, sizeof(__pyx_k_Function_cuStreamWaitValue64_not), 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_cuStreamWriteValue64_no, __pyx_k_Function_cuStreamWriteValue64_no, sizeof(__pyx_k_Function_cuStreamWriteValue64_no), 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_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_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 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_kp_u_libcuda_so, __pyx_k_libcuda_so, sizeof(__pyx_k_libcuda_so), 0, 1, 0, 0},
  {&__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_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 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_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
  {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, 424, __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":402
 *     __cuPythonInit = True
 *     with gil:
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)             # <<<<<<<<<<<<<<
 *     cdef char libPath[260]
 *     libPath[0] = 0
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "cuda/_cuda/ccuda.pyx":424
 *             handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW)
 *             if (handle == NULL):
 *                 raise RuntimeError('Failed to dlopen libcuda.so')             # <<<<<<<<<<<<<<
 *     global __cuGetErrorString
 *     global __cuGetErrorName
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Failed_to_dlopen_libcuda_so); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "cuda/_cuda/ccuda.pyx":3538
 *     if __cuGetErrorString == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)
 *     return err
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetErrorString_not_fo); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 3538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "cuda/_cuda/ccuda.pyx":3547
 *     if __cuGetErrorName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 *     return err
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetErrorName_not_foun); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "cuda/_cuda/ccuda.pyx":3556
 *     if __cuInit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 *     return err
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Function_cuInit_not_found); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 3556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "cuda/_cuda/ccuda.pyx":3565
 *     if __cuDriverGetVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 *     return err
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDriverGetVersion_not); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "cuda/_cuda/ccuda.pyx":3574
 *     if __cuDeviceGet == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 *     return err
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGet_not_found); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 3574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "cuda/_cuda/ccuda.pyx":3583
 *     if __cuDeviceGetCount == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 *     return err
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetCount_not_fo); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 3583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "cuda/_cuda/ccuda.pyx":3592
 *     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__9 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetName_not_fou); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 3592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "cuda/_cuda/ccuda.pyx":3601
 *     if __cuDeviceGetUuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 *     return err
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetUuid_not_fou); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 3601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "cuda/_cuda/ccuda.pyx":3610
 *     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__11 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetUuid_v2_not); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 3610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "cuda/_cuda/ccuda.pyx":3619
 *     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__12 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetLuid_not_fou); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 3619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "cuda/_cuda/ccuda.pyx":3628
 *     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__13 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceTotalMem_v2_not); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 3628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "cuda/_cuda/ccuda.pyx":3637
 *     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__14 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetTexture1DLin); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 3637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cuda/_cuda/ccuda.pyx":3646
 *     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__15 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetAttribute_no); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 3646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "cuda/_cuda/ccuda.pyx":3655
 *     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__16 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetNvSciSyncAtt); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 3655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "cuda/_cuda/ccuda.pyx":3664
 *     if __cuDeviceSetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 *     return err
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceSetMemPool_not); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 3664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "cuda/_cuda/ccuda.pyx":3673
 *     if __cuDeviceGetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 *     return err
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetMemPool_not); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "cuda/_cuda/ccuda.pyx":3682
 *     if __cuDeviceGetDefaultMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 *     return err
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetDefaultMemPo); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 3682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "cuda/_cuda/ccuda.pyx":3691
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFlushGPUDirectRDMAWri); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 3691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "cuda/_cuda/ccuda.pyx":3700
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 *     return err
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetProperties_n); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 3700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "cuda/_cuda/ccuda.pyx":3709
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 *     return err
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceComputeCapabili); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 3709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "cuda/_cuda/ccuda.pyx":3718
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxRetai); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 3718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "cuda/_cuda/ccuda.pyx":3727
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 *     return err
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxRelea); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 3727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "cuda/_cuda/ccuda.pyx":3736
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 *     return err
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxSetFl); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 3736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "cuda/_cuda/ccuda.pyx":3745
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 *     return err
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxGetSt); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 3745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "cuda/_cuda/ccuda.pyx":3754
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxReset); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 3754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "cuda/_cuda/ccuda.pyx":3763
 *     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__28 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetExecAffinity); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 3763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "cuda/_cuda/ccuda.pyx":3772
 *     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__29 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxCreate_v2_not_foun); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "cuda/_cuda/ccuda.pyx":3781
 *     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__30 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxCreate_v3_not_foun); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 3781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "cuda/_cuda/ccuda.pyx":3790
 *     if __cuCtxDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 *     return err
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDestroy_v2_not_fou); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 3790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "cuda/_cuda/ccuda.pyx":3799
 *     if __cuCtxPushCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 *     return err
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxPushCurrent_v2_not); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 3799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "cuda/_cuda/ccuda.pyx":3808
 *     if __cuCtxPopCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 *     return err
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxPopCurrent_v2_not); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 3808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "cuda/_cuda/ccuda.pyx":3817
 *     if __cuCtxSetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 *     return err
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetCurrent_not_fou); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 3817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "cuda/_cuda/ccuda.pyx":3826
 *     if __cuCtxGetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 *     return err
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetCurrent_not_fou); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 3826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "cuda/_cuda/ccuda.pyx":3835
 *     if __cuCtxGetDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 *     return err
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetDevice_not_foun); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 3835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "cuda/_cuda/ccuda.pyx":3844
 *     if __cuCtxGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 *     return err
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetFlags_not_found); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 3844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "cuda/_cuda/ccuda.pyx":3853
 *     if __cuCtxSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 *     return err
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSynchronize_not_fo); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "cuda/_cuda/ccuda.pyx":3862
 *     if __cuCtxSetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 *     return err
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetLimit_not_found); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 3862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "cuda/_cuda/ccuda.pyx":3871
 *     if __cuCtxGetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 *     return err
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetLimit_not_found); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 3871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "cuda/_cuda/ccuda.pyx":3880
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 *     return err
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetCacheConfig_not); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 3880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "cuda/_cuda/ccuda.pyx":3889
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 *     return err
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetCacheConfig_not); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 3889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "cuda/_cuda/ccuda.pyx":3898
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 *     return err
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetSharedMemConfig); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 3898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "cuda/_cuda/ccuda.pyx":3907
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 *     return err
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetSharedMemConfig); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 3907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "cuda/_cuda/ccuda.pyx":3916
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 *     return err
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetApiVersion_not); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 3916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "cuda/_cuda/ccuda.pyx":3925
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 *     return err
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetStreamPriorityR); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 3925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "cuda/_cuda/ccuda.pyx":3934
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 *     return err
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxResetPersistingL2C); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 3934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "cuda/_cuda/ccuda.pyx":3943
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 *     return err
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetExecAffinity_no); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 3943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "cuda/_cuda/ccuda.pyx":3952
 *     if __cuCtxAttach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 *     return err
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxAttach_not_found); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 3952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "cuda/_cuda/ccuda.pyx":3961
 *     if __cuCtxDetach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 *     return err
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDetach_not_found); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 3961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "cuda/_cuda/ccuda.pyx":3970
 *     if __cuModuleLoad == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 *     return err
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoad_not_found); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 3970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "cuda/_cuda/ccuda.pyx":3979
 *     if __cuModuleLoadData == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 *     return err
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadData_not_fo); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 3979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "cuda/_cuda/ccuda.pyx":3988
 *     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__53 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadDataEx_not); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 3988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "cuda/_cuda/ccuda.pyx":3997
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 *     return err
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadFatBinary_n); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 3997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "cuda/_cuda/ccuda.pyx":4006
 *     if __cuModuleUnload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     return err
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleUnload_not_foun); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 4006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "cuda/_cuda/ccuda.pyx":4015
 *     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, 4015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "cuda/_cuda/ccuda.pyx":4024
 *     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, 4024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "cuda/_cuda/ccuda.pyx":4033
 *     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, 4033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "cuda/_cuda/ccuda.pyx":4042
 *     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, 4042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "cuda/_cuda/ccuda.pyx":4051
 *     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, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "cuda/_cuda/ccuda.pyx":4060
 *     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, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "cuda/_cuda/ccuda.pyx":4069
 *     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, 4069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "cuda/_cuda/ccuda.pyx":4078
 *     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, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "cuda/_cuda/ccuda.pyx":4087
 *     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, 4087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "cuda/_cuda/ccuda.pyx":4096
 *     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, 4096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "cuda/_cuda/ccuda.pyx":4105
 *     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, 4105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "cuda/_cuda/ccuda.pyx":4114
 *     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, 4114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "cuda/_cuda/ccuda.pyx":4123
 *     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, 4123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "cuda/_cuda/ccuda.pyx":4132
 *     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, 4132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "cuda/_cuda/ccuda.pyx":4141
 *     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, 4141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "cuda/_cuda/ccuda.pyx":4150
 *     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, 4150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "cuda/_cuda/ccuda.pyx":4159
 *     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, 4159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "cuda/_cuda/ccuda.pyx":4168
 *     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, 4168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "cuda/_cuda/ccuda.pyx":4177
 *     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, 4177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "cuda/_cuda/ccuda.pyx":4186
 *     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, 4186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "cuda/_cuda/ccuda.pyx":4195
 *     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, 4195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "cuda/_cuda/ccuda.pyx":4204
 *     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, 4204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "cuda/_cuda/ccuda.pyx":4213
 *     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, 4213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "cuda/_cuda/ccuda.pyx":4222
 *     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, 4222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "cuda/_cuda/ccuda.pyx":4231
 *     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, 4231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "cuda/_cuda/ccuda.pyx":4240
 *     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, 4240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "cuda/_cuda/ccuda.pyx":4249
 *     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, 4249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "cuda/_cuda/ccuda.pyx":4258
 *     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, 4258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "cuda/_cuda/ccuda.pyx":4267
 *     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, 4267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "cuda/_cuda/ccuda.pyx":4276
 *     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, 4276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "cuda/_cuda/ccuda.pyx":4285
 *     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, 4285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "cuda/_cuda/ccuda.pyx":4294
 *     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, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "cuda/_cuda/ccuda.pyx":4303
 *     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, 4303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "cuda/_cuda/ccuda.pyx":4312
 *     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, 4312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "cuda/_cuda/ccuda.pyx":4321
 *     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, 4321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "cuda/_cuda/ccuda.pyx":4330
 *     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, 4330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "cuda/_cuda/ccuda.pyx":4339
 *     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, 4339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "cuda/_cuda/ccuda.pyx":4348
 *     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, 4348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "cuda/_cuda/ccuda.pyx":4357
 *     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, 4357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "cuda/_cuda/ccuda.pyx":4366
 *     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, 4366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "cuda/_cuda/ccuda.pyx":4375
 *     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, 4375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "cuda/_cuda/ccuda.pyx":4384
 *     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, 4384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "cuda/_cuda/ccuda.pyx":4393
 *     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, 4393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "cuda/_cuda/ccuda.pyx":4402
 *     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, 4402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "cuda/_cuda/ccuda.pyx":4411
 *     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, 4411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "cuda/_cuda/ccuda.pyx":4420
 *     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, 4420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "cuda/_cuda/ccuda.pyx":4429
 *     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, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "cuda/_cuda/ccuda.pyx":4438
 *     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, 4438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "cuda/_cuda/ccuda.pyx":4447
 *     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, 4447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "cuda/_cuda/ccuda.pyx":4456
 *     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, 4456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "cuda/_cuda/ccuda.pyx":4465
 *     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, 4465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "cuda/_cuda/ccuda.pyx":4474
 *     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, 4474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "cuda/_cuda/ccuda.pyx":4483
 *     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, 4483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "cuda/_cuda/ccuda.pyx":4492
 *     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, 4492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "cuda/_cuda/ccuda.pyx":4501
 *     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, 4501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "cuda/_cuda/ccuda.pyx":4510
 *     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, 4510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "cuda/_cuda/ccuda.pyx":4519
 *     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, 4519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "cuda/_cuda/ccuda.pyx":4528
 *     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, 4528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "cuda/_cuda/ccuda.pyx":4537
 *     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, 4537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "cuda/_cuda/ccuda.pyx":4546
 *     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, 4546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "cuda/_cuda/ccuda.pyx":4555
 *     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, 4555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "cuda/_cuda/ccuda.pyx":4564
 *     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, 4564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);

  /* "cuda/_cuda/ccuda.pyx":4573
 *     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, 4573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "cuda/_cuda/ccuda.pyx":4582
 *     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, 4582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "cuda/_cuda/ccuda.pyx":4591
 *     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, 4591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "cuda/_cuda/ccuda.pyx":4600
 *     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, 4600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "cuda/_cuda/ccuda.pyx":4609
 *     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, 4609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "cuda/_cuda/ccuda.pyx":4618
 *     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, 4618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "cuda/_cuda/ccuda.pyx":4627
 *     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, 4627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "cuda/_cuda/ccuda.pyx":4636
 *     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, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);

  /* "cuda/_cuda/ccuda.pyx":4645
 *     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, 4645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "cuda/_cuda/ccuda.pyx":4654
 *     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, 4654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "cuda/_cuda/ccuda.pyx":4663
 *     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, 4663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);

  /* "cuda/_cuda/ccuda.pyx":4672
 *     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, 4672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);

  /* "cuda/_cuda/ccuda.pyx":4681
 *     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, 4681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "cuda/_cuda/ccuda.pyx":4690
 *     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, 4690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);

  /* "cuda/_cuda/ccuda.pyx":4699
 *     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, 4699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);

  /* "cuda/_cuda/ccuda.pyx":4708
 *     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, 4708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);

  /* "cuda/_cuda/ccuda.pyx":4717
 *     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__134 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAddressReserve_not); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 4717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);

  /* "cuda/_cuda/ccuda.pyx":4726
 *     if __cuMemAddressFree == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)
 *     return err
 */
  __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAddressFree_not_fo); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 4726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);

  /* "cuda/_cuda/ccuda.pyx":4735
 *     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__136 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemCreate_not_found); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 4735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "cuda/_cuda/ccuda.pyx":4744
 *     if __cuMemRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)
 *     return err
 */
  __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRelease_not_found); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 4744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);

  /* "cuda/_cuda/ccuda.pyx":4753
 *     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__138 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemMap_not_found); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 4753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "cuda/_cuda/ccuda.pyx":4762
 *     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__139 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemMapArrayAsync_not); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 4762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);

  /* "cuda/_cuda/ccuda.pyx":4771
 *     if __cuMemUnmap == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)
 *     return err
 */
  __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemUnmap_not_found); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 4771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);

  /* "cuda/_cuda/ccuda.pyx":4780
 *     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__141 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemSetAccess_not_foun); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 4780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);

  /* "cuda/_cuda/ccuda.pyx":4789
 *     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__142 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAccess_not_foun); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 4789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "cuda/_cuda/ccuda.pyx":4798
 *     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__143 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemExportToShareableH); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 4798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "cuda/_cuda/ccuda.pyx":4807
 *     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__144 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemImportFromShareabl); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 4807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);

  /* "cuda/_cuda/ccuda.pyx":4816
 *     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__145 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAllocationGranu); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 4816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "cuda/_cuda/ccuda.pyx":4825
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 *     return err
 */
  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAllocationPrope); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 4825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "cuda/_cuda/ccuda.pyx":4834
 *     if __cuMemRetainAllocationHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 *     return err
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRetainAllocationHa); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 4834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "cuda/_cuda/ccuda.pyx":4843
 *     if __cuMemFreeAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)
 *     return err
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFreeAsync_not_foun); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 4843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);

  /* "cuda/_cuda/ccuda.pyx":4852
 *     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__149 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocAsync_not_fou); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 4852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);

  /* "cuda/_cuda/ccuda.pyx":4861
 *     if __cuMemPoolTrimTo == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)
 *     return err
 */
  __pyx_tuple__150 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolTrimTo_not_fou); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 4861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);

  /* "cuda/_cuda/ccuda.pyx":4870
 *     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__151 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolSetAttribute_n); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 4870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "cuda/_cuda/ccuda.pyx":4879
 *     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__152 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolGetAttribute_n); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 4879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "cuda/_cuda/ccuda.pyx":4888
 *     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__153 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolSetAccess_not); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 4888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "cuda/_cuda/ccuda.pyx":4897
 *     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__154 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolGetAccess_not); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 4897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "cuda/_cuda/ccuda.pyx":4906
 *     if __cuMemPoolCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 *     return err
 */
  __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolCreate_not_fou); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 4906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "cuda/_cuda/ccuda.pyx":4915
 *     if __cuMemPoolDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)
 *     return err
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolDestroy_not_fo); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 4915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "cuda/_cuda/ccuda.pyx":4924
 *     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__157 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocFromPoolAsync); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 4924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);

  /* "cuda/_cuda/ccuda.pyx":4933
 *     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__158 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolExportToSharea); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 4933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "cuda/_cuda/ccuda.pyx":4942
 *     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__159 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolImportFromShar); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 4942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);

  /* "cuda/_cuda/ccuda.pyx":4951
 *     if __cuMemPoolExportPointer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)
 *     return err
 */
  __pyx_tuple__160 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolExportPointer); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 4951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);

  /* "cuda/_cuda/ccuda.pyx":4960
 *     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__161 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolImportPointer); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 4960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);

  /* "cuda/_cuda/ccuda.pyx":4969
 *     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__162 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerGetAttribute_n); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 4969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);

  /* "cuda/_cuda/ccuda.pyx":4978
 *     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__163 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPrefetchAsync_not); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 4978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "cuda/_cuda/ccuda.pyx":4987
 *     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__164 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAdvise_not_found); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 4987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);

  /* "cuda/_cuda/ccuda.pyx":4996
 *     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__165 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRangeGetAttribute); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 4996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);

  /* "cuda/_cuda/ccuda.pyx":5005
 *     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__166 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRangeGetAttributes); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 5005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);

  /* "cuda/_cuda/ccuda.pyx":5014
 *     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__167 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerSetAttribute_n); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 5014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);

  /* "cuda/_cuda/ccuda.pyx":5023
 *     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__168 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerGetAttributes); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 5023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);

  /* "cuda/_cuda/ccuda.pyx":5032
 *     if __cuStreamCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)
 *     return err
 */
  __pyx_tuple__169 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCreate_not_foun); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 5032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);

  /* "cuda/_cuda/ccuda.pyx":5041
 *     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__170 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCreateWithPrior); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 5041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);

  /* "cuda/_cuda/ccuda.pyx":5050
 *     if __cuStreamGetPriority == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 *     return err
 */
  __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetPriority_not); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 5050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);

  /* "cuda/_cuda/ccuda.pyx":5059
 *     if __cuStreamGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 *     return err
 */
  __pyx_tuple__172 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetFlags_not_fo); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 5059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);

  /* "cuda/_cuda/ccuda.pyx":5068
 *     if __cuStreamGetCtx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)
 *     return err
 */
  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCtx_not_foun); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 5068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);

  /* "cuda/_cuda/ccuda.pyx":5077
 *     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__174 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitEvent_not_f); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 5077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);

  /* "cuda/_cuda/ccuda.pyx":5086
 *     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__175 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamAddCallback_not); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 5086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "cuda/_cuda/ccuda.pyx":5095
 *     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__176 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBeginCapture_v2); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 5095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);

  /* "cuda/_cuda/ccuda.pyx":5104
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 *     return err
 */
  __pyx_tuple__177 = PyTuple_Pack(1, __pyx_kp_u_Function_cuThreadExchangeStreamC); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 5104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);

  /* "cuda/_cuda/ccuda.pyx":5113
 *     if __cuStreamEndCapture == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 *     return err
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamEndCapture_not); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 5113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);

  /* "cuda/_cuda/ccuda.pyx":5122
 *     if __cuStreamIsCapturing == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 *     return err
 */
  __pyx_tuple__179 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamIsCapturing_not); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 5122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);

  /* "cuda/_cuda/ccuda.pyx":5131
 *     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__180 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCaptureInfo); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 5131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);

  /* "cuda/_cuda/ccuda.pyx":5140
 *     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__181 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCaptureInfo_2); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 5140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);

  /* "cuda/_cuda/ccuda.pyx":5149
 *     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__182 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamUpdateCaptureDe); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 5149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);

  /* "cuda/_cuda/ccuda.pyx":5158
 *     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__183 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamAttachMemAsync); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "cuda/_cuda/ccuda.pyx":5167
 *     if __cuStreamQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 *     return err
 */
  __pyx_tuple__184 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamQuery_not_found); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 5167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);

  /* "cuda/_cuda/ccuda.pyx":5176
 *     if __cuStreamSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 *     return err
 */
  __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamSynchronize_not); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 5176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);

  /* "cuda/_cuda/ccuda.pyx":5185
 *     if __cuStreamDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 *     return err
 */
  __pyx_tuple__186 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamDestroy_v2_not); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 5185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);

  /* "cuda/_cuda/ccuda.pyx":5194
 *     if __cuStreamCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)
 *     return err
 */
  __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCopyAttributes); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 5194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);

  /* "cuda/_cuda/ccuda.pyx":5203
 *     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__188 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetAttribute_no); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);

  /* "cuda/_cuda/ccuda.pyx":5212
 *     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__189 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamSetAttribute_no); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 5212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);

  /* "cuda/_cuda/ccuda.pyx":5221
 *     if __cuEventCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 *     return err
 */
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventCreate_not_found); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 5221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);

  /* "cuda/_cuda/ccuda.pyx":5230
 *     if __cuEventRecord == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)
 *     return err
 */
  __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventRecord_not_found); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 5230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);

  /* "cuda/_cuda/ccuda.pyx":5239
 *     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__192 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventRecordWithFlags); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);

  /* "cuda/_cuda/ccuda.pyx":5248
 *     if __cuEventQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 *     return err
 */
  __pyx_tuple__193 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventQuery_not_found); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 5248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);

  /* "cuda/_cuda/ccuda.pyx":5257
 *     if __cuEventSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 *     return err
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventSynchronize_not); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 5257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);

  /* "cuda/_cuda/ccuda.pyx":5266
 *     if __cuEventDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)
 *     return err
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventDestroy_v2_not_f); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 5266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);

  /* "cuda/_cuda/ccuda.pyx":5275
 *     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__196 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventElapsedTime_not); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 5275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);

  /* "cuda/_cuda/ccuda.pyx":5284
 *     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__197 = PyTuple_Pack(1, __pyx_kp_u_Function_cuImportExternalMemory); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 5284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);

  /* "cuda/_cuda/ccuda.pyx":5293
 *     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__198 = PyTuple_Pack(1, __pyx_kp_u_Function_cuExternalMemoryGetMapp); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 5293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);

  /* "cuda/_cuda/ccuda.pyx":5302
 *     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__199 = PyTuple_Pack(1, __pyx_kp_u_Function_cuExternalMemoryGetMapp_2); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 5302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);

  /* "cuda/_cuda/ccuda.pyx":5311
 *     if __cuDestroyExternalMemory == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)
 *     return err
 */
  __pyx_tuple__200 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDestroyExternalMemory); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 5311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);

  /* "cuda/_cuda/ccuda.pyx":5320
 *     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__201 = PyTuple_Pack(1, __pyx_kp_u_Function_cuImportExternalSemapho); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);

  /* "cuda/_cuda/ccuda.pyx":5329
 *     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__202 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSignalExternalSemapho); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 5329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);

  /* "cuda/_cuda/ccuda.pyx":5338
 *     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__203 = PyTuple_Pack(1, __pyx_kp_u_Function_cuWaitExternalSemaphore); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 5338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "cuda/_cuda/ccuda.pyx":5347
 *     if __cuDestroyExternalSemaphore == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 *     return err
 */
  __pyx_tuple__204 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDestroyExternalSemaph); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 5347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);

  /* "cuda/_cuda/ccuda.pyx":5356
 *     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__205 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue32_not); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 5356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);

  /* "cuda/_cuda/ccuda.pyx":5365
 *     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__206 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue64_not); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 5365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);

  /* "cuda/_cuda/ccuda.pyx":5374
 *     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__207 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue32_no); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 5374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);

  /* "cuda/_cuda/ccuda.pyx":5383
 *     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__208 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue64_no); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 5383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);

  /* "cuda/_cuda/ccuda.pyx":5392
 *     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__209 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBatchMemOp_not); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 5392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);

  /* "cuda/_cuda/ccuda.pyx":5401
 *     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__210 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncGetAttribute_not); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 5401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);

  /* "cuda/_cuda/ccuda.pyx":5410
 *     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__211 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetAttribute_not); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 5410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);

  /* "cuda/_cuda/ccuda.pyx":5419
 *     if __cuFuncSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 *     return err
 */
  __pyx_tuple__212 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetCacheConfig_no); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 5419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);

  /* "cuda/_cuda/ccuda.pyx":5428
 *     if __cuFuncSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 *     return err
 */
  __pyx_tuple__213 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetSharedMemConfi); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 5428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);

  /* "cuda/_cuda/ccuda.pyx":5437
 *     if __cuFuncGetModule == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)
 *     return err
 */
  __pyx_tuple__214 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncGetModule_not_fou); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 5437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);

  /* "cuda/_cuda/ccuda.pyx":5446
 *     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__215 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchKernel_not_foun); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 5446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);

  /* "cuda/_cuda/ccuda.pyx":5455
 *     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__216 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchCooperativeKern); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 5455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);

  /* "cuda/_cuda/ccuda.pyx":5464
 *     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__217 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchCooperativeKern_2); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 5464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);

  /* "cuda/_cuda/ccuda.pyx":5473
 *     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__218 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchHostFunc_not_fo); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 5473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);

  /* "cuda/_cuda/ccuda.pyx":5482
 *     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__219 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetBlockShape_not); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 5482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);

  /* "cuda/_cuda/ccuda.pyx":5491
 *     if __cuFuncSetSharedSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)
 *     return err
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetSharedSize_not); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 5491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);

  /* "cuda/_cuda/ccuda.pyx":5500
 *     if __cuParamSetSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)
 *     return err
 */
  __pyx_tuple__221 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetSize_not_foun); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 5500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);

  /* "cuda/_cuda/ccuda.pyx":5509
 *     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__222 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSeti_not_found); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 5509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);

  /* "cuda/_cuda/ccuda.pyx":5518
 *     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__223 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetf_not_found); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 5518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);

  /* "cuda/_cuda/ccuda.pyx":5527
 *     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__224 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetv_not_found); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 5527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);

  /* "cuda/_cuda/ccuda.pyx":5536
 *     if __cuLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)
 *     return err
 */
  __pyx_tuple__225 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunch_not_found); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 5536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);

  /* "cuda/_cuda/ccuda.pyx":5545
 *     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__226 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchGrid_not_found); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 5545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);

  /* "cuda/_cuda/ccuda.pyx":5554
 *     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__227 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchGridAsync_not_f); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 5554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);

  /* "cuda/_cuda/ccuda.pyx":5563
 *     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__228 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetTexRef_not_fo); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 5563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);

  /* "cuda/_cuda/ccuda.pyx":5572
 *     if __cuGraphCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 *     return err
 */
  __pyx_tuple__229 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphCreate_not_found); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 5572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);

  /* "cuda/_cuda/ccuda.pyx":5581
 *     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__230 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddKernelNode_no); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 5581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "cuda/_cuda/ccuda.pyx":5590
 *     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__231 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeGetPar); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 5590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);

  /* "cuda/_cuda/ccuda.pyx":5599
 *     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__232 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeSetPar); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 5599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "cuda/_cuda/ccuda.pyx":5608
 *     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__233 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemcpyNode_no); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 5608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);

  /* "cuda/_cuda/ccuda.pyx":5617
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__234 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemcpyNodeGetPar); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);

  /* "cuda/_cuda/ccuda.pyx":5626
 *     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__235 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemcpyNodeSetPar); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 5626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);

  /* "cuda/_cuda/ccuda.pyx":5635
 *     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__236 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemsetNode_no); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 5635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);

  /* "cuda/_cuda/ccuda.pyx":5644
 *     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__237 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemsetNodeGetPar); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 5644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);

  /* "cuda/_cuda/ccuda.pyx":5653
 *     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__238 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemsetNodeSetPar); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 5653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);

  /* "cuda/_cuda/ccuda.pyx":5662
 *     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__239 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddHostNode_not); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 5662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);

  /* "cuda/_cuda/ccuda.pyx":5671
 *     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__240 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphHostNodeGetParam); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 5671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);

  /* "cuda/_cuda/ccuda.pyx":5680
 *     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__241 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphHostNodeSetParam); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 5680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);

  /* "cuda/_cuda/ccuda.pyx":5689
 *     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__242 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddChildGraphNod); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 5689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);

  /* "cuda/_cuda/ccuda.pyx":5698
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)
 *     return err
 */
  __pyx_tuple__243 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphChildGraphNodeGe); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 5698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);

  /* "cuda/_cuda/ccuda.pyx":5707
 *     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__244 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEmptyNode_not); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 5707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);

  /* "cuda/_cuda/ccuda.pyx":5716
 *     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__245 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEventRecordNo); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 5716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);

  /* "cuda/_cuda/ccuda.pyx":5725
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 *     return err
 */
  __pyx_tuple__246 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventRecordNodeG); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 5725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);

  /* "cuda/_cuda/ccuda.pyx":5734
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)
 *     return err
 */
  __pyx_tuple__247 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventRecordNodeS); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 5734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);

  /* "cuda/_cuda/ccuda.pyx":5743
 *     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__248 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEventWaitNode); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 5743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);

  /* "cuda/_cuda/ccuda.pyx":5752
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 *     return err
 */
  __pyx_tuple__249 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventWaitNodeGet); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 5752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);

  /* "cuda/_cuda/ccuda.pyx":5761
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)
 *     return err
 */
  __pyx_tuple__250 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventWaitNodeSet); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 5761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);

  /* "cuda/_cuda/ccuda.pyx":5770
 *     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__251 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddExternalSemap); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 5770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);

  /* "cuda/_cuda/ccuda.pyx":5779
 *     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__252 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 5779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);

  /* "cuda/_cuda/ccuda.pyx":5788
 *     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__253 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_2); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 5788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);

  /* "cuda/_cuda/ccuda.pyx":5797
 *     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__254 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddExternalSemap_2); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 5797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);

  /* "cuda/_cuda/ccuda.pyx":5806
 *     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__255 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_3); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 5806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);

  /* "cuda/_cuda/ccuda.pyx":5815
 *     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__256 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_4); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 5815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "cuda/_cuda/ccuda.pyx":5824
 *     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__257 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemAllocNode); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 5824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);

  /* "cuda/_cuda/ccuda.pyx":5833
 *     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__258 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemAllocNodeGetP); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 5833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "cuda/_cuda/ccuda.pyx":5842
 *     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__259 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemFreeNode_n); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 5842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);

  /* "cuda/_cuda/ccuda.pyx":5851
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 *     return err
 */
  __pyx_tuple__260 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemFreeNodeGetPa); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 5851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);

  /* "cuda/_cuda/ccuda.pyx":5860
 *     if __cuDeviceGraphMemTrim == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 *     return err
 */
  __pyx_tuple__261 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGraphMemTrim_no); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 5860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);

  /* "cuda/_cuda/ccuda.pyx":5869
 *     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__262 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetGraphMemAttr); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 5869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);

  /* "cuda/_cuda/ccuda.pyx":5878
 *     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__263 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceSetGraphMemAttr); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 5878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);

  /* "cuda/_cuda/ccuda.pyx":5887
 *     if __cuGraphClone == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)
 *     return err
 */
  __pyx_tuple__264 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphClone_not_found); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 5887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);

  /* "cuda/_cuda/ccuda.pyx":5896
 *     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__265 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeFindInClone); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 5896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);

  /* "cuda/_cuda/ccuda.pyx":5905
 *     if __cuGraphNodeGetType == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)
 *     return err
 */
  __pyx_tuple__266 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetType_not); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 5905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);

  /* "cuda/_cuda/ccuda.pyx":5914
 *     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__267 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetNodes_not_fou); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 5914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);

  /* "cuda/_cuda/ccuda.pyx":5923
 *     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__268 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetRootNodes_not); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 5923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);

  /* "cuda/_cuda/ccuda.pyx":5932
 *     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__269 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetEdges_not_fou); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 5932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);

  /* "cuda/_cuda/ccuda.pyx":5941
 *     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__270 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetDependenc); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 5941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);

  /* "cuda/_cuda/ccuda.pyx":5950
 *     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__271 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetDependent); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 5950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);

  /* "cuda/_cuda/ccuda.pyx":5959
 *     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__272 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddDependencies); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 5959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);

  /* "cuda/_cuda/ccuda.pyx":5968
 *     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__273 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphRemoveDependenci); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 5968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);

  /* "cuda/_cuda/ccuda.pyx":5977
 *     if __cuGraphDestroyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 *     return err
 */
  __pyx_tuple__274 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDestroyNode_not); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 5977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);

  /* "cuda/_cuda/ccuda.pyx":5986
 *     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__275 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphInstantiate_v2_n); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 5986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);

  /* "cuda/_cuda/ccuda.pyx":5995
 *     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__276 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphInstantiateWithF); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 5995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);

  /* "cuda/_cuda/ccuda.pyx":6004
 *     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__277 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecKernelNodeSe); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 6004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);

  /* "cuda/_cuda/ccuda.pyx":6013
 *     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__278 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecMemcpyNodeSe); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 6013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);

  /* "cuda/_cuda/ccuda.pyx":6022
 *     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__279 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecMemsetNodeSe); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 6022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);

  /* "cuda/_cuda/ccuda.pyx":6031
 *     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__280 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecHostNodeSetP); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 6031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);

  /* "cuda/_cuda/ccuda.pyx":6040
 *     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__281 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecChildGraphNo); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 6040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);

  /* "cuda/_cuda/ccuda.pyx":6049
 *     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__282 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecEventRecordN); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 6049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);

  /* "cuda/_cuda/ccuda.pyx":6058
 *     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__283 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecEventWaitNod); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 6058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);

  /* "cuda/_cuda/ccuda.pyx":6067
 *     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__284 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecExternalSema); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 6067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);

  /* "cuda/_cuda/ccuda.pyx":6076
 *     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__285 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecExternalSema_2); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 6076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);

  /* "cuda/_cuda/ccuda.pyx":6085
 *     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__286 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeSetEnabled_n); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 6085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__286);
  __Pyx_GIVEREF(__pyx_tuple__286);

  /* "cuda/_cuda/ccuda.pyx":6094
 *     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__287 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetEnabled_n); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 6094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);

  /* "cuda/_cuda/ccuda.pyx":6103
 *     if __cuGraphUpload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 *     return err
 */
  __pyx_tuple__288 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphUpload_not_found); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 6103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);

  /* "cuda/_cuda/ccuda.pyx":6112
 *     if __cuGraphLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 *     return err
 */
  __pyx_tuple__289 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphLaunch_not_found); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 6112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__289);
  __Pyx_GIVEREF(__pyx_tuple__289);

  /* "cuda/_cuda/ccuda.pyx":6121
 *     if __cuGraphExecDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 *     return err
 */
  __pyx_tuple__290 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecDestroy_not); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 6121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);

  /* "cuda/_cuda/ccuda.pyx":6130
 *     if __cuGraphDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 *     return err
 */
  __pyx_tuple__291 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDestroy_not_foun); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 6130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);

  /* "cuda/_cuda/ccuda.pyx":6139
 *     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__292 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecUpdate_not_f); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 6139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);

  /* "cuda/_cuda/ccuda.pyx":6148
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)
 *     return err
 */
  __pyx_tuple__293 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeCopyAt); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 6148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);

  /* "cuda/_cuda/ccuda.pyx":6157
 *     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__294 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeGetAtt); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 6157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);

  /* "cuda/_cuda/ccuda.pyx":6166
 *     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__295 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeSetAtt); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 6166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "cuda/_cuda/ccuda.pyx":6175
 *     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__296 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDebugDotPrint_no); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 6175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__296);
  __Pyx_GIVEREF(__pyx_tuple__296);

  /* "cuda/_cuda/ccuda.pyx":6184
 *     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__297 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectCreate_not); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 6184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);

  /* "cuda/_cuda/ccuda.pyx":6193
 *     if __cuUserObjectRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)
 *     return err
 */
  __pyx_tuple__298 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectRetain_not); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 6193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);

  /* "cuda/_cuda/ccuda.pyx":6202
 *     if __cuUserObjectRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)
 *     return err
 */
  __pyx_tuple__299 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectRelease_not); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 6202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);

  /* "cuda/_cuda/ccuda.pyx":6211
 *     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__300 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphRetainUserObject); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 6211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);

  /* "cuda/_cuda/ccuda.pyx":6220
 *     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__301 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphReleaseUserObjec); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 6220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "cuda/_cuda/ccuda.pyx":6229
 *     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__302 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveBlo); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 6229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);

  /* "cuda/_cuda/ccuda.pyx":6238
 *     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__303 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 6238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);

  /* "cuda/_cuda/ccuda.pyx":6247
 *     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__304 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 6247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);

  /* "cuda/_cuda/ccuda.pyx":6256
 *     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__305 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential_2); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 6256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);

  /* "cuda/_cuda/ccuda.pyx":6265
 *     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__306 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyAvailableDyn); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 6265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);

  /* "cuda/_cuda/ccuda.pyx":6274
 *     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__307 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetArray_not_fo); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 6274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);

  /* "cuda/_cuda/ccuda.pyx":6283
 *     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__308 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmappedArr); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 6283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);

  /* "cuda/_cuda/ccuda.pyx":6292
 *     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__309 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddress_v2_n); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 6292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);

  /* "cuda/_cuda/ccuda.pyx":6301
 *     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__310 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddress2D_v3); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 6301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);

  /* "cuda/_cuda/ccuda.pyx":6310
 *     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__311 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFormat_not_f); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 6310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__311);
  __Pyx_GIVEREF(__pyx_tuple__311);

  /* "cuda/_cuda/ccuda.pyx":6319
 *     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__312 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddressMode); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 6319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);

  /* "cuda/_cuda/ccuda.pyx":6328
 *     if __cuTexRefSetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)
 *     return err
 */
  __pyx_tuple__313 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFilterMode_n); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 6328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);

  /* "cuda/_cuda/ccuda.pyx":6337
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 *     return err
 */
  __pyx_tuple__314 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapFilter); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 6337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);

  /* "cuda/_cuda/ccuda.pyx":6346
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)
 *     return err
 */
  __pyx_tuple__315 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapLevelB); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 6346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);

  /* "cuda/_cuda/ccuda.pyx":6355
 *     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__316 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapLevelC); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 6355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);

  /* "cuda/_cuda/ccuda.pyx":6364
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 *     return err
 */
  __pyx_tuple__317 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMaxAnisotrop); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 6364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);

  /* "cuda/_cuda/ccuda.pyx":6373
 *     if __cuTexRefSetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 *     return err
 */
  __pyx_tuple__318 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetBorderColor); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 6373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);

  /* "cuda/_cuda/ccuda.pyx":6382
 *     if __cuTexRefSetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)
 *     return err
 */
  __pyx_tuple__319 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFlags_not_fo); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 6382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);

  /* "cuda/_cuda/ccuda.pyx":6391
 *     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__320 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetAddress_v2_n); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 6391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);

  /* "cuda/_cuda/ccuda.pyx":6400
 *     if __cuTexRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 *     return err
 */
  __pyx_tuple__321 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetArray_not_fo); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 6400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);

  /* "cuda/_cuda/ccuda.pyx":6409
 *     if __cuTexRefGetMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)
 *     return err
 */
  __pyx_tuple__322 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmappedArr); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 6409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);

  /* "cuda/_cuda/ccuda.pyx":6418
 *     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__323 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetAddressMode); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 6418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);

  /* "cuda/_cuda/ccuda.pyx":6427
 *     if __cuTexRefGetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)
 *     return err
 */
  __pyx_tuple__324 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFilterMode_n); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 6427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);

  /* "cuda/_cuda/ccuda.pyx":6436
 *     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__325 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFormat_not_f); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 6436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);

  /* "cuda/_cuda/ccuda.pyx":6445
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 *     return err
 */
  __pyx_tuple__326 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapFilter); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 6445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);

  /* "cuda/_cuda/ccuda.pyx":6454
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)
 *     return err
 */
  __pyx_tuple__327 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapLevelB); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 6454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);

  /* "cuda/_cuda/ccuda.pyx":6463
 *     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__328 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapLevelC); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 6463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);

  /* "cuda/_cuda/ccuda.pyx":6472
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 *     return err
 */
  __pyx_tuple__329 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMaxAnisotrop); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 6472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);

  /* "cuda/_cuda/ccuda.pyx":6481
 *     if __cuTexRefGetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 *     return err
 */
  __pyx_tuple__330 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetBorderColor); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 6481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);

  /* "cuda/_cuda/ccuda.pyx":6490
 *     if __cuTexRefGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 *     return err
 */
  __pyx_tuple__331 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFlags_not_fo); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 6490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);

  /* "cuda/_cuda/ccuda.pyx":6499
 *     if __cuTexRefCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 *     return err
 */
  __pyx_tuple__332 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefCreate_not_foun); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 6499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__332);
  __Pyx_GIVEREF(__pyx_tuple__332);

  /* "cuda/_cuda/ccuda.pyx":6508
 *     if __cuTexRefDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 *     return err
 */
  __pyx_tuple__333 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefDestroy_not_fou); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 6508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);

  /* "cuda/_cuda/ccuda.pyx":6517
 *     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__334 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfRefSetArray_not_f); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 6517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);

  /* "cuda/_cuda/ccuda.pyx":6526
 *     if __cuSurfRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)
 *     return err
 */
  __pyx_tuple__335 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfRefGetArray_not_f); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 6526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);

  /* "cuda/_cuda/ccuda.pyx":6535
 *     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__336 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectCreate_not_f); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 6535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);

  /* "cuda/_cuda/ccuda.pyx":6544
 *     if __cuTexObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 *     return err
 */
  __pyx_tuple__337 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectDestroy_not); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 6544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);

  /* "cuda/_cuda/ccuda.pyx":6553
 *     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__338 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetResourceD); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);

  /* "cuda/_cuda/ccuda.pyx":6562
 *     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__339 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetTextureDe); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 6562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);

  /* "cuda/_cuda/ccuda.pyx":6571
 *     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__340 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetResourceV); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 6571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);

  /* "cuda/_cuda/ccuda.pyx":6580
 *     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__341 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectCreate_not); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 6580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);

  /* "cuda/_cuda/ccuda.pyx":6589
 *     if __cuSurfObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 *     return err
 */
  __pyx_tuple__342 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectDestroy_not); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 6589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);

  /* "cuda/_cuda/ccuda.pyx":6598
 *     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__343 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectGetResource); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 6598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);

  /* "cuda/_cuda/ccuda.pyx":6607
 *     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__344 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceCanAccessPeer_n); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 6607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);

  /* "cuda/_cuda/ccuda.pyx":6616
 *     if __cuCtxEnablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 *     return err
 */
  __pyx_tuple__345 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxEnablePeerAccess_n); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 6616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);

  /* "cuda/_cuda/ccuda.pyx":6625
 *     if __cuCtxDisablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)
 *     return err
 */
  __pyx_tuple__346 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDisablePeerAccess); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 6625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);

  /* "cuda/_cuda/ccuda.pyx":6634
 *     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__347 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetP2PAttribute); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 6634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);

  /* "cuda/_cuda/ccuda.pyx":6643
 *     if __cuGraphicsUnregisterResource == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)
 *     return err
 */
  __pyx_tuple__348 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsUnregisterRes); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 6643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);

  /* "cuda/_cuda/ccuda.pyx":6652
 *     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__349 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsSubResourceGe); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 6652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__349);
  __Pyx_GIVEREF(__pyx_tuple__349);

  /* "cuda/_cuda/ccuda.pyx":6661
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)
 *     return err
 */
  __pyx_tuple__350 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 6661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);

  /* "cuda/_cuda/ccuda.pyx":6670
 *     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__351 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa_2); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 6670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__351);
  __Pyx_GIVEREF(__pyx_tuple__351);

  /* "cuda/_cuda/ccuda.pyx":6679
 *     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__352 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceSetMa); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 6679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);

  /* "cuda/_cuda/ccuda.pyx":6688
 *     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__353 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsMapResources); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 6688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);

  /* "cuda/_cuda/ccuda.pyx":6697
 *     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__354 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsUnmapResource); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 6697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);

  /* "cuda/_cuda/ccuda.pyx":6706
 *     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__355 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetProcAddress_not_fo); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 6706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);

  /* "cuda/_cuda/ccuda.pyx":6715
 *     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__356 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetExportTable_not_fo); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(0, 6715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);

  /* "cuda/_cuda/ccuda.pyx":6724
 *     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__357 = PyTuple_Pack(1, __pyx_kp_u_Function_cuProfilerInitialize_no); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 6724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);

  /* "cuda/_cuda/ccuda.pyx":6733
 *     if __cuProfilerStart == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()
 *     return err
 */
  __pyx_tuple__358 = PyTuple_Pack(1, __pyx_kp_u_Function_cuProfilerStart_not_fou); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 6733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);

  /* "cuda/_cuda/ccuda.pyx":6742
 *     if __cuProfilerStop == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()
 *     return err
 */
  __pyx_tuple__359 = PyTuple_Pack(1, __pyx_kp_u_Function_cuProfilerStop_not_foun); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(0, 6742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__359);
  __Pyx_GIVEREF(__pyx_tuple__359);

  /* "cuda/_cuda/ccuda.pyx":6751
 *     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__360 = PyTuple_Pack(1, __pyx_kp_u_Function_cuVDPAUGetDevice_not_fo); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 6751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);

  /* "cuda/_cuda/ccuda.pyx":6760
 *     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__361 = PyTuple_Pack(1, __pyx_kp_u_Function_cuVDPAUCtxCreate_v2_not); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(0, 6760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);

  /* "cuda/_cuda/ccuda.pyx":6769
 *     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__362 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsVDPAURegister); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 6769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);

  /* "cuda/_cuda/ccuda.pyx":6778
 *     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__363 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsVDPAURegister_2); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(0, 6778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);

  /* "cuda/_cuda/ccuda.pyx":6787
 *     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__364 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsEGLRegisterIm); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 6787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);

  /* "cuda/_cuda/ccuda.pyx":6796
 *     if __cuEGLStreamConsumerConnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)
 *     return err
 */
  __pyx_tuple__365 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerConn); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 6796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);

  /* "cuda/_cuda/ccuda.pyx":6805
 *     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__366 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerConn_2); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(0, 6805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);

  /* "cuda/_cuda/ccuda.pyx":6814
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)
 *     return err
 */
  __pyx_tuple__367 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerDisc); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 6814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);

  /* "cuda/_cuda/ccuda.pyx":6823
 *     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__368 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerAcqu); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(0, 6823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__368);
  __Pyx_GIVEREF(__pyx_tuple__368);

  /* "cuda/_cuda/ccuda.pyx":6832
 *     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__369 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerRele); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 6832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);

  /* "cuda/_cuda/ccuda.pyx":6841
 *     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__370 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerConn); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 6841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);

  /* "cuda/_cuda/ccuda.pyx":6850
 *     if __cuEGLStreamProducerDisconnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)
 *     return err
 */
  __pyx_tuple__371 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerDisc); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 6850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__371);
  __Pyx_GIVEREF(__pyx_tuple__371);

  /* "cuda/_cuda/ccuda.pyx":6859
 *     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__372 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerPres); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 6859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);

  /* "cuda/_cuda/ccuda.pyx":6868
 *     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__373 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerRetu); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 6868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);

  /* "cuda/_cuda/ccuda.pyx":6877
 *     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__374 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa_3); if (unlikely(!__pyx_tuple__374)) __PYX_ERR(0, 6877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__374);
  __Pyx_GIVEREF(__pyx_tuple__374);

  /* "cuda/_cuda/ccuda.pyx":6886
 *     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__375 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventCreateFromEGLSyn); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 6886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);

  /* "cuda/_cuda/ccuda.pyx":6895
 *     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__376 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsGLRegisterBuf); if (unlikely(!__pyx_tuple__376)) __PYX_ERR(0, 6895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__376);
  __Pyx_GIVEREF(__pyx_tuple__376);

  /* "cuda/_cuda/ccuda.pyx":6904
 *     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__377 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsGLRegisterIma); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 6904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__377);
  __Pyx_GIVEREF(__pyx_tuple__377);

  /* "cuda/_cuda/ccuda.pyx":6913
 *     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__378 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGLGetDevices_v2_not_f); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(0, 6913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);
  __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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGetErrorName", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorName, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuInit", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuInit, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDriverGetVersion", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDriverGetVersion, "__pyx_t_4cuda_5ccuda_CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGet", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetCount", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount, "__pyx_t_4cuda_5ccuda_CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetName", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName, "__pyx_t_4cuda_5ccuda_CUresult (char *, int, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetUuid", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUuuid *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetUuid_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUuuid *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetLuid", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetLuid, "__pyx_t_4cuda_5ccuda_CUresult (char *, unsigned int *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceTotalMem_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2, "__pyx_t_4cuda_5ccuda_CUresult (size_t *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetTexture1DLinearMaxWidth, "__pyx_t_4cuda_5ccuda_CUresult (size_t *, __pyx_t_4cuda_5ccuda_CUarray_format, unsigned int, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_CUdevice_attribute, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetNvSciSyncAttributes, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetMemPool, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetMemPool, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDefaultMemPool, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFlushGPUDirectRDMAWrites, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget, __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetProperties", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetProperties, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevprop *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceComputeCapability", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceComputeCapability, "__pyx_t_4cuda_5ccuda_CUresult (int *, int *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxRetain", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxRelease_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRelease_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxSetFlags_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxSetFlags_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxGetState", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxGetState, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetExecAffinitySupport", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_CUexecAffinityType, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxCreate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *, unsigned int, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxCreate_v3", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v3, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *, __pyx_t_4cuda_5ccuda_CUexecAffinityParam *, int, unsigned int, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxDestroy_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDestroy_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxPushCurrent_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPushCurrent_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxPopCurrent_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPopCurrent_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetCurrent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetCurrent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetDevice", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevice, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetFlags, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSynchronize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSynchronize, "__pyx_t_4cuda_5ccuda_CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetLimit", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetLimit, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetLimit", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetLimit, "__pyx_t_4cuda_5ccuda_CUresult (size_t *, __pyx_t_4cuda_5ccuda_CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetCacheConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCacheConfig, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCacheConfig, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetSharedMemConfig, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetApiVersion", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetApiVersion, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetStreamPriorityRange, "__pyx_t_4cuda_5ccuda_CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxResetPersistingL2Cache, "__pyx_t_4cuda_5ccuda_CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetExecAffinity", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetExecAffinity, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUexecAffinityParam *, __pyx_t_4cuda_5ccuda_CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxAttach", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxAttach, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxDetach", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDetach, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleLoad", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoad, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleLoadData", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadData, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleLoadDataEx", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadDataEx, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmodule *, void const *, unsigned int, __pyx_t_4cuda_5ccuda_CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleLoadFatBinary", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadFatBinary, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleUnload", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleUnload, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleGetFunction", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t *, __pyx_t_4cuda_5ccuda_CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleGetTexRef", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetTexRef, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref *, __pyx_t_4cuda_5ccuda_CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleGetSurfRef", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUsurfref *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int, __pyx_t_4cuda_5ccuda_CUjit_option *, void **, __pyx_t_4cuda_5ccuda_CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLinkAddData_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddData_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUlinkState, __pyx_t_4cuda_5ccuda_CUjitInputType, void *, size_t, char const *, unsigned int, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUlinkState, __pyx_t_4cuda_5ccuda_CUjitInputType, char const *, unsigned int, __pyx_t_4cuda_5ccuda_CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLinkComplete", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLinkComplete, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetInfo_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetInfo_v2, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetAddressRange_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAddressRange_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t *, __pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAllocHost_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocHost_v2, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemHostAlloc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetPCIBusId, "__pyx_t_4cuda_5ccuda_CUresult (char *, int, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetEventHandle, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUipcEventHandle *, __pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenEventHandle, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUevent *, __pyx_t_4cuda_5ccuda_CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetMemHandle, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUipcMemHandle *, __pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcOpenMemHandle_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenMemHandle_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, __pyx_t_4cuda_5ccuda_CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcCloseMemHandle, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemHostRegister_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostRegister_v2, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyPeer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeer, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUcontext, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeerAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUcontext, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUcontext, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyHtoDAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, void const *, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyDtoHAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyDtoDAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyHtoAAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoAAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray, size_t, void const *, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyAtoHAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoHAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_CUarray, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy2DAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy3DAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD8_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned char, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD16Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16Async, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned short, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD32Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32Async, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned int, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D8Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned char, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D16Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16Async, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned short, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D32Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32Async, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned int, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayCreate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayCreate_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR *, __pyx_t_4cuda_5ccuda_CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetSparseProperties, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES *, __pyx_t_4cuda_5ccuda_CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetSparseProperties, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES *, __pyx_t_4cuda_5ccuda_CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetMemoryRequirements, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *, __pyx_t_4cuda_5ccuda_CUarray, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetMemoryRequirements, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *, __pyx_t_4cuda_5ccuda_CUmipmappedArray, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayGetPlane", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetPlane, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayDestroy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArray3DCreate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR *, __pyx_t_4cuda_5ccuda_CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayDestroy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAddressReserve", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressReserve, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemMap", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemMap, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarrayMapInfo *, unsigned int, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemUnmap", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemSetAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (unsigned PY_LONG_LONG *, __pyx_t_4cuda_5ccuda_CUmemLocation const *, __pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *, void *, __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetAllocationGranularity", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity, "__pyx_t_4cuda_5ccuda_CUresult (size_t *, __pyx_t_4cuda_5ccuda_CUmemAllocationProp const *, __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetAllocationPropertiesFromHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemAllocationProp *, __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemRetainAllocationHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemFreeAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAllocAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemAccess_flags *, __pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool *, __pyx_t_4cuda_5ccuda_CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAllocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t, __pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemoryPool *, void *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData *, __pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, __pyx_t_4cuda_5ccuda_CUmemoryPool, __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuPointerGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_CUpointer_attribute, __pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAdvise", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUmem_advise, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (void *, size_t, __pyx_t_4cuda_5ccuda_CUmem_range_attribute, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes, "__pyx_t_4cuda_5ccuda_CUresult (void **, size_t *, __pyx_t_4cuda_5ccuda_CUmem_range_attribute *, size_t, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuPointerSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (void const *, __pyx_t_4cuda_5ccuda_CUpointer_attribute, __pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int, __pyx_t_4cuda_5ccuda_CUpointer_attribute *, void **, __pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetCtx", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamAddCallback", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamEndCapture", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetCaptureInfo", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *, __pyx_t_4cuda_5ccuda_cuuint64_t *, __pyx_t_4cuda_5ccuda_CUgraph *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamSynchronize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamDestroy_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamAttrID, __pyx_t_4cuda_5ccuda_CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamAttrID, __pyx_t_4cuda_5ccuda_CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventRecord", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUevent, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUevent, __pyx_t_4cuda_5ccuda_CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventQuery", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventSynchronize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventDestroy_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventElapsedTime", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime, "__pyx_t_4cuda_5ccuda_CUresult (float *, __pyx_t_4cuda_5ccuda_CUevent, __pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuImportExternalMemory", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUexternalMemory *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, __pyx_t_4cuda_5ccuda_CUexternalMemory, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_CUexternalMemory, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUexternalSemaphore *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUexternalSemaphore const *, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuWaitExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUexternalSemaphore const *, __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWaitValue32", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, unsigned int, __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_CUfunction_attribute, __pyx_t_4cuda_5ccuda_CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncGetModule", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmodule *, __pyx_t_4cuda_5ccuda_CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchKernel", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, __pyx_t_4cuda_5ccuda_CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchCooperativeKernel", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, __pyx_t_4cuda_5ccuda_CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchCooperativeKernelMultiDevice", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetBlockShape", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSetSize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSeti", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSetv", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchGrid", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchGridAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, int, int, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSetTexRef", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfunction, int, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddKernelNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *, __pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS const *, __pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, size_t, __pyx_t_4cuda_5ccuda_CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphClone", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph *, __pyx_t_4cuda_5ccuda_CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphGetNodes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphGetEdges", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode const *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphInstantiate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiate_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec *, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *, __pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS const *, __pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphUpload", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphLaunch", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecUpdate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphExec, __pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUgraphNode *, __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphNode, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID, __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUuserObject *, void *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuUserObjectRelease", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraph, __pyx_t_4cuda_5ccuda_CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (int *, int *, __pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (int *, int *, __pyx_t_4cuda_5ccuda_CUfunction, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (size_t *, __pyx_t_4cuda_5ccuda_CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMipmappedArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (size_t *, __pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR const *, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetFormat", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetAddressMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, int, __pyx_t_4cuda_5ccuda_CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetFilterMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, __pyx_t_4cuda_5ccuda_CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetBorderColor", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMipmappedArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetAddressMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUaddress_mode *, __pyx_t_4cuda_5ccuda_CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetFilterMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfilter_mode *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetFormat", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray_format *, int *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUfilter_mode *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias, "__pyx_t_4cuda_5ccuda_CUresult (float *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp, "__pyx_t_4cuda_5ccuda_CUresult (float *, float *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetBorderColor", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor, "__pyx_t_4cuda_5ccuda_CUresult (float *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int *, __pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfRefSetArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUsurfref, __pyx_t_4cuda_5ccuda_CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfRefGetArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexObject *, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC const *, __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC const *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *, __pyx_t_4cuda_5ccuda_CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectGetTextureDesc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC *, __pyx_t_4cuda_5ccuda_CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectGetResourceViewDesc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC *, __pyx_t_4cuda_5ccuda_CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfObjectCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUsurfObject *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *, __pyx_t_4cuda_5ccuda_CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute, __pyx_t_4cuda_5ccuda_CUdevice, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsResourceGetMappedPointer_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t *, __pyx_t_4cuda_5ccuda_CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsResourceSetMapFlags_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int, __pyx_t_4cuda_5ccuda_CUgraphicsResource *, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int, __pyx_t_4cuda_5ccuda_CUgraphicsResource *, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGetProcAddress", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress, "__pyx_t_4cuda_5ccuda_CUresult (char const *, void **, int, __pyx_t_4cuda_5ccuda_cuuint64_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGetExportTable", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable, "__pyx_t_4cuda_5ccuda_CUresult (void const **, __pyx_t_4cuda_5ccuda_CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuProfilerInitialize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerInitialize, "__pyx_t_4cuda_5ccuda_CUresult (char const *, char const *, __pyx_t_4cuda_5ccuda_CUoutput_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuProfilerStart", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart, "__pyx_t_4cuda_5ccuda_CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuProfilerStop", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop, "__pyx_t_4cuda_5ccuda_CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuVDPAUGetDevice", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *, unsigned int, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUgraphicsResource *, __pyx_t_4cuda_5ccuda_CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamConsumerReleaseFrame", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUgraphicsResource, __pyx_t_4cuda_5ccuda_CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamProducerConnect", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerConnect, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, __pyx_t_4cuda_5ccuda_CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamProducerReturnFrame", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, __pyx_t_4cuda_5ccuda_CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsResourceGetMappedEglFrame", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUeglFrame *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int *, __pyx_t_4cuda_5ccuda_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, "__pyx_t_4cuda_5ccuda_CUresult (char const *, void **, int, __pyx_t_4cuda_5ccuda_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;
  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":14
 * ELSE:
 *     cimport cuda._lib.dlfcn as dlfcn
 * import os             # <<<<<<<<<<<<<<
 * import sys
 * cimport cuda._cuda.loader as loader
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/_cuda/ccuda.pyx":15
 *     cimport cuda._lib.dlfcn as dlfcn
 * import os
 * import sys             # <<<<<<<<<<<<<<
 * cimport cuda._cuda.loader as loader
 * cdef bint __cuPythonInit = False
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/_cuda/ccuda.pyx":17
 * 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":18
 * 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":19
 * 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":20
 * 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":21
 * 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":22
 * 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":23
 * 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":24
 * 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":25
 * 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":26
 * 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":27
 * 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":28
 * 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":29
 * 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":30
 * 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":31
 * 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":32
 * 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":33
 * 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":34
 * 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":35
 * 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":36
 * 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":37
 * 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":38
 * 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":39
 * 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":40
 * 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":41
 * 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":42
 * 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":43
 * 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":44
 * 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":45
 * 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":46
 * 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":47
 * 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":48
 * 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":49
 * 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":50
 * 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":51
 * 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":52
 * 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":53
 * 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":54
 * 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":55
 * 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":56
 * 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":57
 * 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":58
 * 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":59
 * 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":60
 * 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":61
 * 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":62
 * 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":63
 * 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":64
 * 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":65
 * 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":66
 * 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":67
 * 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":68
 * 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":69
 * cdef void *__cuModuleLoadData = NULL
 * cdef void *__cuModuleLoadDataEx = NULL
 * cdef void *__cuModuleLoadFatBinary = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleUnload = NULL
 * cdef void *__cuModuleGetFunction = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary = NULL;

  /* "cuda/_cuda/ccuda.pyx":70
 * cdef void *__cuModuleLoadDataEx = NULL
 * cdef void *__cuModuleLoadFatBinary = NULL
 * cdef void *__cuModuleUnload = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetFunction = NULL
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload = NULL;

  /* "cuda/_cuda/ccuda.pyx":71
 * cdef void *__cuModuleLoadFatBinary = NULL
 * cdef void *__cuModuleUnload = 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":72
 * cdef void *__cuModuleUnload = 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":73
 * 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":74
 * 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":75
 * 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":76
 * 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":77
 * 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":78
 * 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":79
 * 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":80
 * 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":81
 * 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":82
 * 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":83
 * 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":84
 * 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":85
 * 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":86
 * 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":87
 * 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":88
 * 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":89
 * 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":90
 * 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":91
 * 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":92
 * 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":93
 * 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":94
 * 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":95
 * 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":96
 * 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":97
 * 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":98
 * 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":99
 * 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":100
 * 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":101
 * 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":102
 * 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":103
 * 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":104
 * 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":105
 * 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":106
 * 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":107
 * 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":108
 * 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":109
 * 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":110
 * 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":111
 * 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":112
 * 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":113
 * 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":114
 * 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":115
 * 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":116
 * 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":117
 * 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":118
 * 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":119
 * 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":120
 * 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":121
 * 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":122
 * 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":123
 * 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":124
 * 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":125
 * 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":126
 * 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":127
 * 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":128
 * 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":129
 * 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":130
 * 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":131
 * 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":132
 * 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":133
 * 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":134
 * 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":135
 * 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":136
 * 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":137
 * 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":138
 * 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":139
 * 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":140
 * 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":141
 * 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":142
 * 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":143
 * 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":144
 * 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":145
 * 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":146
 * 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":147
 * cdef void *__cuArray3DGetDescriptor_v2 = NULL
 * cdef void *__cuMipmappedArrayCreate = NULL
 * cdef void *__cuMipmappedArrayGetLevel = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMipmappedArrayDestroy = NULL
 * cdef void *__cuMemAddressReserve = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel = NULL;

  /* "cuda/_cuda/ccuda.pyx":148
 * cdef void *__cuMipmappedArrayCreate = NULL
 * cdef void *__cuMipmappedArrayGetLevel = NULL
 * cdef void *__cuMipmappedArrayDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAddressReserve = NULL
 * cdef void *__cuMemAddressFree = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":149
 * cdef void *__cuMipmappedArrayGetLevel = NULL
 * cdef void *__cuMipmappedArrayDestroy = 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":150
 * cdef void *__cuMipmappedArrayDestroy = 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":151
 * 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":152
 * 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":153
 * 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":154
 * 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":155
 * 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":156
 * 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":157
 * 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":158
 * 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":159
 * 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":160
 * 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":161
 * 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":162
 * 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":163
 * 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":164
 * 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":165
 * 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":166
 * 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":167
 * 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":168
 * 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":169
 * 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":170
 * 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":171
 * 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":172
 * 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":173
 * 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":174
 * 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":175
 * 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":176
 * 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":177
 * 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":178
 * 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":179
 * 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":180
 * 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":181
 * 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":182
 * 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":183
 * 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":184
 * 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":185
 * 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":186
 * 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":187
 * 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":188
 * 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":189
 * 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":190
 * 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":191
 * 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":192
 * 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":193
 * 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":194
 * 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":195
 * 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":196
 * 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":197
 * 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":198
 * 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":199
 * 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":200
 * 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":201
 * 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":202
 * 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":203
 * 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":204
 * 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":205
 * 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":206
 * 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":207
 * 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":208
 * 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":209
 * 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":210
 * 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":211
 * 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":212
 * 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":213
 * 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":214
 * 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":215
 * 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":216
 * 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":217
 * 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":218
 * 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":219
 * 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":220
 * 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":221
 * 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":222
 * 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":223
 * cdef void *__cuStreamWaitValue64 = NULL
 * cdef void *__cuStreamWriteValue32 = NULL
 * cdef void *__cuStreamWriteValue64 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamBatchMemOp = NULL
 * cdef void *__cuFuncGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64 = NULL;

  /* "cuda/_cuda/ccuda.pyx":224
 * cdef void *__cuStreamWriteValue32 = NULL
 * cdef void *__cuStreamWriteValue64 = NULL
 * cdef void *__cuStreamBatchMemOp = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFuncGetAttribute = NULL
 * cdef void *__cuFuncSetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp = NULL;

  /* "cuda/_cuda/ccuda.pyx":225
 * cdef void *__cuStreamWriteValue64 = NULL
 * cdef void *__cuStreamBatchMemOp = 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":226
 * cdef void *__cuStreamBatchMemOp = 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":227
 * 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":228
 * 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":229
 * cdef void *__cuFuncSetCacheConfig = NULL
 * cdef void *__cuFuncSetSharedMemConfig = NULL
 * cdef void *__cuFuncGetModule = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchKernel = NULL
 * cdef void *__cuLaunchCooperativeKernel = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule = NULL;

  /* "cuda/_cuda/ccuda.pyx":230
 * cdef void *__cuFuncSetSharedMemConfig = NULL
 * cdef void *__cuFuncGetModule = NULL
 * cdef void *__cuLaunchKernel = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchCooperativeKernel = NULL
 * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel = NULL;

  /* "cuda/_cuda/ccuda.pyx":231
 * cdef void *__cuFuncGetModule = NULL
 * cdef void *__cuLaunchKernel = 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":232
 * cdef void *__cuLaunchKernel = 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":233
 * 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":234
 * 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":235
 * 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":236
 * 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":237
 * 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":238
 * 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":239
 * 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":240
 * 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":241
 * 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":242
 * 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":243
 * 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":244
 * 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":245
 * 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":246
 * 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":247
 * 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":248
 * 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":249
 * 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":250
 * 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":251
 * 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":252
 * 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":253
 * 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":254
 * 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":255
 * 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":256
 * 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":257
 * 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":258
 * 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":259
 * 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":260
 * 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":261
 * 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":262
 * 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":263
 * 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":264
 * 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":265
 * 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":266
 * 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":267
 * 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":268
 * 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":269
 * 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":270
 * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL
 * cdef void *__cuGraphAddMemAllocNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":271
 * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddMemAllocNode = NULL
 * cdef void *__cuGraphMemAllocNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":272
 * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = 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":273
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = 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":274
 * 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":275
 * 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":276
 * 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":277
 * 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":278
 * 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":279
 * 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":280
 * 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":281
 * 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":282
 * 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":283
 * 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":284
 * 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":285
 * 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":286
 * 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":287
 * 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":288
 * 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":289
 * 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":290
 * 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":291
 * 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":292
 * 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":293
 * 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":294
 * 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":295
 * 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":296
 * 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":297
 * 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":298
 * 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":299
 * 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":300
 * 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":301
 * 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":302
 * 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":303
 * 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":304
 * 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":305
 * 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":306
 * 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":307
 * 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":308
 * 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":309
 * 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":310
 * 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":311
 * 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":312
 * 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":313
 * 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":314
 * 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":315
 * 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":316
 * 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":317
 * 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":318
 * 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":319
 * 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":320
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL
 * cdef void *__cuTexRefSetArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":321
 * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetArray = NULL
 * cdef void *__cuTexRefSetMipmappedArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock = NULL;

  /* "cuda/_cuda/ccuda.pyx":322
 * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = 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":323
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = 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":324
 * 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":325
 * 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":326
 * 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":327
 * 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":328
 * 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":329
 * 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":330
 * 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":331
 * 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":332
 * 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":333
 * 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":334
 * 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":335
 * 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":336
 * 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":337
 * 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":338
 * 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":339
 * 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":340
 * 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":341
 * 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":342
 * 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":343
 * 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":344
 * 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":345
 * 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":346
 * 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":347
 * 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":348
 * 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":349
 * 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":350
 * 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":351
 * 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":352
 * 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":353
 * 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":354
 * 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":355
 * 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":356
 * 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":357
 * 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":358
 * 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":359
 * 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":360
 * 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":361
 * 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":362
 * 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":363
 * 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":364
 * 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":365
 * 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":366
 * 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":367
 * 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":368
 * 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":369
 * 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":370
 * 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":371
 * 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":372
 * 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":373
 * 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":374
 * 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":375
 * 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":376
 * 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":377
 * 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":378
 * 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":379
 * 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":380
 * 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":381
 * 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":382
 * 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":383
 * 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":384
 * 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":385
 * 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":386
 * 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":387
 * 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":388
 * 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":389
 * 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":390
 * 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":391
 * 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":392
 * 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":393
 * 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_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  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);
    }
}

/* 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

/* 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;
}

/* 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"
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;
    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) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __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);
}

/* 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);
    }
}

/* 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;\
    }

/* 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;
}

/* 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

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        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 */
