/* Generated by Cython 0.29.26 */

/* 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_26"
#define CYTHON_HEX_VERSION 0x001D1AF0
#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
  #ifndef 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
  #ifndef 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":1340
 * 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":1342
 * 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;

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

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

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

/* "cuda/ccuda.pxd":147
 * ctypedef CUmemAttach_flags_enum CUmemAttach_flags
 * 
 * cdef enum CUctx_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_CTX_SCHED_AUTO = 0x00
 *     CU_CTX_SCHED_SPIN = 0x01
 */
enum __pyx_t_4cuda_5ccuda_CUctx_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_AUTO = 0x00,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_SPIN = 0x01,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_YIELD = 0x02,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_BLOCKING_SYNC = 0x04,
  __pyx_e_4cuda_5ccuda_CU_CTX_BLOCKING_SYNC = 0x04,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_MASK = 0x07,
  __pyx_e_4cuda_5ccuda_CU_CTX_MAP_HOST = 0x08,
  __pyx_e_4cuda_5ccuda_CU_CTX_LMEM_RESIZE_TO_MAX = 0x10,
  __pyx_e_4cuda_5ccuda_CU_CTX_FLAGS_MASK = 0x1f
};

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

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

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

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

/* "cuda/ccuda.pxd":186
 * ctypedef CUevent_wait_flags_enum CUevent_wait_flags
 * 
 * cdef enum CUstreamWaitValue_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_WAIT_VALUE_GEQ = 0x0
 *     CU_STREAM_WAIT_VALUE_EQ = 0x1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamWaitValue_flags_enum {

  /* "cuda/ccuda.pxd":191
 *     CU_STREAM_WAIT_VALUE_AND = 0x2
 *     CU_STREAM_WAIT_VALUE_NOR = 0x3
 *     CU_STREAM_WAIT_VALUE_FLUSH = 1<<30             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUstreamWaitValue_flags_enum CUstreamWaitValue_flags
 */
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_GEQ = 0x0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_EQ = 0x1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_AND = 0x2,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_NOR = 0x3,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_FLUSH = (1 << 30)
};

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

/* "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 = 0x0
 *     CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 0x1
 */
enum __pyx_t_4cuda_5ccuda_CUoccupancy_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_OCCUPANCY_DEFAULT = 0x0,
  __pyx_e_4cuda_5ccuda_CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 0x1
};

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

/* "cuda/ccuda.pxd":251
 * ctypedef CUstreamUpdateCaptureDependencies_flags_enum CUstreamUpdateCaptureDependencies_flags
 * 
 * cdef enum CUarray_format_enum:             # <<<<<<<<<<<<<<
 *     CU_AD_FORMAT_UNSIGNED_INT8 = 0x01
 *     CU_AD_FORMAT_UNSIGNED_INT16 = 0x02
 */
enum __pyx_t_4cuda_5ccuda_CUarray_format_enum {
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8 = 0x01,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16 = 0x02,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32 = 0x03,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8 = 0x08,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16 = 0x09,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32 = 0x0a,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF = 0x10,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT = 0x20,
  __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_MAX
};

/* "cuda/ccuda.pxd":450
 * 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":471
 * 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
};

/* "cuda/ccuda.pxd":486
 * ctypedef CUfunction_attribute_enum CUfunction_attribute
 * 
 * cdef enum CUfunc_cache_enum:             # <<<<<<<<<<<<<<
 *     CU_FUNC_CACHE_PREFER_NONE = 0x00
 *     CU_FUNC_CACHE_PREFER_SHARED = 0x01
 */
enum __pyx_t_4cuda_5ccuda_CUfunc_cache_enum {
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_NONE = 0x00,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_SHARED = 0x01,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_L1 = 0x02,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_EQUAL = 0x03
};

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

/* "cuda/ccuda.pxd":501
 * 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":508
 * ctypedef CUshared_carveout_enum CUshared_carveout
 * 
 * cdef enum CUmemorytype_enum:             # <<<<<<<<<<<<<<
 *     CU_MEMORYTYPE_HOST = 0x01
 *     CU_MEMORYTYPE_DEVICE = 0x02
 */
enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum {
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST = 0x01,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE = 0x02,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY = 0x03,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED = 0x04
};

/* "cuda/ccuda.pxd":516
 * 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":523
 * 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":533
 * 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":541
 * ctypedef CUmem_range_attribute_enum CUmem_range_attribute
 * 
 * cdef enum CUjit_option_enum:             # <<<<<<<<<<<<<<
 *     CU_JIT_MAX_REGISTERS = 0
 *     CU_JIT_THREADS_PER_BLOCK
 */
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,
  __pyx_e_4cuda_5ccuda_CU_JIT_WALL_TIME,
  __pyx_e_4cuda_5ccuda_CU_JIT_INFO_LOG_BUFFER,
  __pyx_e_4cuda_5ccuda_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES,
  __pyx_e_4cuda_5ccuda_CU_JIT_ERROR_LOG_BUFFER,
  __pyx_e_4cuda_5ccuda_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES,
  __pyx_e_4cuda_5ccuda_CU_JIT_OPTIMIZATION_LEVEL,
  __pyx_e_4cuda_5ccuda_CU_JIT_TARGET_FROM_CUCONTEXT,
  __pyx_e_4cuda_5ccuda_CU_JIT_TARGET,
  __pyx_e_4cuda_5ccuda_CU_JIT_FALLBACK_STRATEGY,
  __pyx_e_4cuda_5ccuda_CU_JIT_GENERATE_DEBUG_INFO,
  __pyx_e_4cuda_5ccuda_CU_JIT_LOG_VERBOSE,
  __pyx_e_4cuda_5ccuda_CU_JIT_GENERATE_LINE_INFO,
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_MODE,
  __pyx_e_4cuda_5ccuda_CU_JIT_NEW_SM3X_OPT,
  __pyx_e_4cuda_5ccuda_CU_JIT_FAST_COMPILE,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_NAMES,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_ADDRESSES,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_COUNT,
  __pyx_e_4cuda_5ccuda_CU_JIT_LTO,
  __pyx_e_4cuda_5ccuda_CU_JIT_FTZ,
  __pyx_e_4cuda_5ccuda_CU_JIT_PREC_DIV,
  __pyx_e_4cuda_5ccuda_CU_JIT_PREC_SQRT,
  __pyx_e_4cuda_5ccuda_CU_JIT_FMA,
  __pyx_e_4cuda_5ccuda_CU_JIT_NUM_OPTIONS
};

/* "cuda/ccuda.pxd":571
 * 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":592
 * ctypedef CUjit_target_enum CUjit_target
 * 
 * cdef enum CUjit_fallback_enum:             # <<<<<<<<<<<<<<
 *     CU_PREFER_PTX = 0
 *     CU_PREFER_BINARY
 */
enum __pyx_t_4cuda_5ccuda_CUjit_fallback_enum {
  __pyx_e_4cuda_5ccuda_CU_PREFER_PTX = 0,
  __pyx_e_4cuda_5ccuda_CU_PREFER_BINARY
};

/* "cuda/ccuda.pxd":598
 * ctypedef CUjit_fallback_enum CUjit_fallback
 * 
 * cdef enum CUjit_cacheMode_enum:             # <<<<<<<<<<<<<<
 *     CU_JIT_CACHE_OPTION_NONE = 0
 *     CU_JIT_CACHE_OPTION_CG
 */
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,
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_OPTION_CA
};

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

/* "cuda/ccuda.pxd":621
 * ctypedef CUlinkState_st* CUlinkState
 * 
 * cdef enum CUgraphicsRegisterFlags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_REGISTER_FLAGS_NONE = 0x00
 *     CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 0x01
 */
enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_NONE = 0x00,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 0x01,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 0x02,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 0x04,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 0x08
};

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

/* "cuda/ccuda.pxd":637
 * ctypedef CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags
 * 
 * cdef enum CUarray_cubemap_face_enum:             # <<<<<<<<<<<<<<
 *     CU_CUBEMAP_FACE_POSITIVE_X = 0x00
 *     CU_CUBEMAP_FACE_NEGATIVE_X = 0x01
 */
enum __pyx_t_4cuda_5ccuda_CUarray_cubemap_face_enum {
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_X = 0x00,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_X = 0x01,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_Y = 0x02,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_Y = 0x03,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_Z = 0x04,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_Z = 0x05
};

/* "cuda/ccuda.pxd":647
 * ctypedef CUarray_cubemap_face_enum CUarray_cubemap_face
 * 
 * cdef enum CUlimit_enum:             # <<<<<<<<<<<<<<
 *     CU_LIMIT_STACK_SIZE = 0x00
 *     CU_LIMIT_PRINTF_FIFO_SIZE = 0x01
 */
enum __pyx_t_4cuda_5ccuda_CUlimit_enum {
  __pyx_e_4cuda_5ccuda_CU_LIMIT_STACK_SIZE = 0x00,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_PRINTF_FIFO_SIZE = 0x01,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MALLOC_HEAP_SIZE = 0x02,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 0x03,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 0x04,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 0x05,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_PERSISTING_L2_CACHE_SIZE = 0x06,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MAX
};

/* "cuda/ccuda.pxd":659
 * ctypedef CUlimit_enum CUlimit
 * 
 * cdef enum CUresourcetype_enum:             # <<<<<<<<<<<<<<
 *     CU_RESOURCE_TYPE_ARRAY = 0x00
 *     CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01
 */
enum __pyx_t_4cuda_5ccuda_CUresourcetype_enum {
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_ARRAY = 0x00,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_LINEAR = 0x02,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_PITCH2D = 0x03
};

/* "cuda/ccuda.pxd":669
 * 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":723
 * 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":739
 * 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":747
 * 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":761
 * 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":768
 * 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":775
 * 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":789
 * ctypedef CUstreamAttrValue_v1 CUstreamAttrValue
 * 
 * cdef enum CUdriverProcAddress_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GET_PROC_ADDRESS_DEFAULT = 0
 *     CU_GET_PROC_ADDRESS_LEGACY_STREAM = 1 << 0
 */
enum __pyx_t_4cuda_5ccuda_CUdriverProcAddress_flags_enum {

  /* "cuda/ccuda.pxd":792
 *     CU_GET_PROC_ADDRESS_DEFAULT = 0
 *     CU_GET_PROC_ADDRESS_LEGACY_STREAM = 1 << 0
 *     CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = 1 << 1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUdriverProcAddress_flags_enum CUdriverProcAddress_flags
 */
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_LEGACY_STREAM = (1 << 0),
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = (1 << 1)
};

/* "cuda/ccuda.pxd":796
 * ctypedef CUdriverProcAddress_flags_enum CUdriverProcAddress_flags
 * 
 * cdef enum CUexecAffinityType_enum:             # <<<<<<<<<<<<<<
 *     CU_EXEC_AFFINITY_TYPE_SM_COUNT = 0
 *     CU_EXEC_AFFINITY_TYPE_MAX
 */
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
};

/* "cuda/ccuda.pxd":820
 * 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":911
 * ctypedef cudaError_enum CUresult
 * 
 * cdef enum CUdevice_P2PAttribute_enum:             # <<<<<<<<<<<<<<
 *     CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 0x01
 *     CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 0x02
 */
enum __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute_enum {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 0x01,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 0x02,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 0x03,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = 0x04,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 0x04
};

/* "cuda/ccuda.pxd":1101
 * ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC
 * 
 * cdef enum CUresourceViewFormat_enum:             # <<<<<<<<<<<<<<
 *     CU_RES_VIEW_FORMAT_NONE = 0x00
 *     CU_RES_VIEW_FORMAT_UINT_1X8 = 0x01
 */
enum __pyx_t_4cuda_5ccuda_CUresourceViewFormat_enum {
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_NONE = 0x00,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X8 = 0x01,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X8 = 0x02,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X8 = 0x03,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X8 = 0x04,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X8 = 0x05,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X8 = 0x06,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X16 = 0x07,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X16 = 0x08,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X16 = 0x09,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X16 = 0x0a,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X16 = 0x0b,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X16 = 0x0c,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X32 = 0x0d,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X32 = 0x0e,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X32 = 0x0f,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X32 = 0x10,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X32 = 0x11,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X32 = 0x12,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_1X16 = 0x13,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_2X16 = 0x14,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_4X16 = 0x15,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_1X32 = 0x16,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_2X32 = 0x17,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_4X32 = 0x18,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = 0x19,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = 0x1a,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = 0x1b,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = 0x1c,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC4 = 0x1d,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = 0x1e,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC5 = 0x1f,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = 0x20,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC6H = 0x21,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22
};

/* "cuda/ccuda.pxd":1163
 * 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 = 0x0
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = 0x1
 */
enum __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum {
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = 0x0,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = 0x1,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = 0x3
};

/* "cuda/ccuda.pxd":1186
 * 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":1238
 * 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":1344
 * ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle
 * 
 * cdef enum CUmemAllocationHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_HANDLE_TYPE_NONE = 0x0
 *     CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 0x1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_NONE = 0x0,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 0x1,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_WIN32 = 0x2,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_WIN32_KMT = 0x4,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_MAX = 0x7FFFFFFF
};

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

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

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

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

/* "cuda/ccuda.pxd":1381
 * 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":1387
 * 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":1393
 * 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":1449
 * ctypedef CUmemLocation_v1 CUmemLocation
 * 
 * cdef enum CUmemAllocationCompType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ALLOCATION_COMP_NONE = 0x0
 *     CU_MEM_ALLOCATION_COMP_GENERIC = 0x1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationCompType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_COMP_NONE = 0x0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_COMP_GENERIC = 0x1
};

/* "cuda/ccuda.pxd":1480
 * ctypedef CUmemAccessDesc_v1 CUmemAccessDesc
 * 
 * cdef enum CUgraphExecUpdateResult_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_EXEC_UPDATE_SUCCESS = 0x0
 *     CU_GRAPH_EXEC_UPDATE_ERROR = 0x1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_SUCCESS = 0x0,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR = 0x1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = 0x2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = 0x3,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = 0x4,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = 0x5,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = 0x6,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = 0x7
};

/* "cuda/ccuda.pxd":1492
 * ctypedef CUgraphExecUpdateResult_enum CUgraphExecUpdateResult
 * 
 * cdef enum CUmemPool_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = 1
 *     CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC
 */
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,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RELEASE_THRESHOLD,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_USED_MEM_CURRENT,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_USED_MEM_HIGH
};

/* "cuda/ccuda.pxd":1531
 * ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_st CUDA_MEM_ALLOC_NODE_PARAMS
 * 
 * cdef enum CUgraphMem_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT
 *     CU_GRAPH_MEM_ATTR_USED_MEM_HIGH
 */
enum __pyx_t_4cuda_5ccuda_CUgraphMem_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH
};

/* "cuda/ccuda.pxd":1539
 * ctypedef CUgraphMem_attribute_enum CUgraphMem_attribute
 * 
 * cdef enum CUflushGPUDirectRDMAWritesOptions_enum:             # <<<<<<<<<<<<<<
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = 1<<0
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 1<<1
 */
enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions_enum {

  /* "cuda/ccuda.pxd":1541
 * cdef enum CUflushGPUDirectRDMAWritesOptions_enum:
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = 1<<0
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 1<<1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUflushGPUDirectRDMAWritesOptions_enum CUflushGPUDirectRDMAWritesOptions
 */
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = (1 << 0),
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = (1 << 1)
};

/* "cuda/ccuda.pxd":1545
 * 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":1552
 * 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":1558
 * 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":1563
 * ctypedef CUflushGPUDirectRDMAWritesTarget_enum CUflushGPUDirectRDMAWritesTarget
 * 
 * cdef enum CUgraphDebugDot_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = 1<<0
 *     CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = 1<<1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphDebugDot_flags_enum {

  /* "cuda/ccuda.pxd":1576
 *     CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = 1<<10
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = 1<<11
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = 1<<12             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUgraphDebugDot_flags_enum CUgraphDebugDot_flags
 */
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = (1 << 0),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = (1 << 1),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = (1 << 2),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = (1 << 3),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = (1 << 4),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = (1 << 5),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = (1 << 6),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = (1 << 7),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = (1 << 8),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = (1 << 9),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = (1 << 10),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = (1 << 11),
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = (1 << 12)
};

/* "cuda/ccuda.pxd":1580
 * 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":1585
 * 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":1590
 * 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":2295
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * cdef enum: CUDA_VERSION = 11050             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_VERSION = 0x2B2A
};

/* "cuda/ccuda.pxd":2297
 * cdef enum: CUDA_VERSION = 11050
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_LEGACY = 0x1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_IPC_HANDLE_SIZE = 64
};

/* "cuda/ccuda.pxd":2299
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 * 
 * cdef enum: CU_STREAM_LEGACY = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 0x2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_LEGACY = 0x1
};

/* "cuda/ccuda.pxd":2301
 * cdef enum: CU_STREAM_LEGACY = 0x1
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 0x2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_PER_THREAD = 0x2
};

/* "cuda/ccuda.pxd":2303
 * cdef enum: CU_STREAM_PER_THREAD = 0x2
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 0x02
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_PORTABLE = 0x01
};

/* "cuda/ccuda.pxd":2305
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 0x01
 * 
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 0x04
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_DEVICEMAP = 0x02
};

/* "cuda/ccuda.pxd":2307
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 0x02
 * 
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_WRITECOMBINED = 0x04
};

/* "cuda/ccuda.pxd":2309
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 0x04
 * 
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 0x02
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_PORTABLE = 0x01
};

/* "cuda/ccuda.pxd":2311
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 0x01
 * 
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 0x04
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_DEVICEMAP = 0x02
};

/* "cuda/ccuda.pxd":2313
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 0x02
 * 
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 0x08
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_IOMEMORY = 0x04
};

/* "cuda/ccuda.pxd":2315
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 0x04
 * 
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 0x08             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 0x1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_READ_ONLY = 0x08
};

/* "cuda/ccuda.pxd":2317
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 0x08
 * 
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 0x1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 0x1
};

/* "cuda/ccuda.pxd":2319
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 0x1
 * 
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_DEDICATED = 0x1
};

/* "cuda/ccuda.pxd":2321
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 0x1
 * 
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 0x02
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 0x01
};

/* "cuda/ccuda.pxd":2323
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 0x01
 * 
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 0x1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 0x02
};

/* "cuda/ccuda.pxd":2325
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 0x02
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 0x2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_NVSCISYNC_ATTR_SIGNAL = 0x1
};

/* "cuda/ccuda.pxd":2327
 * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 0x1
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 0x2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 0x1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_NVSCISYNC_ATTR_WAIT = 0x2
};

/* "cuda/ccuda.pxd":2329
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 0x2
 * 
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEM_CREATE_USAGE_TILE_POOL = 0x1
};

/* "cuda/ccuda.pxd":2331
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 0x1
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 0x02
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 0x01
};

/* "cuda/ccuda.pxd":2333
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 0x01
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_LAYERED = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 0x02
};

/* "cuda/ccuda.pxd":2335
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 0x02
 * 
 * cdef enum: CUDA_ARRAY3D_LAYERED = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_LAYERED = 0x01
};

/* "cuda/ccuda.pxd":2337
 * cdef enum: CUDA_ARRAY3D_LAYERED = 0x01
 * 
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 0x02
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_2DARRAY = 0x01
};

/* "cuda/ccuda.pxd":2339
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 0x01
 * 
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 0x04
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_SURFACE_LDST = 0x02
};

/* "cuda/ccuda.pxd":2341
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 0x02
 * 
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 0x08
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_CUBEMAP = 0x04
};

/* "cuda/ccuda.pxd":2343
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 0x04
 * 
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 0x08             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 0x10
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_TEXTURE_GATHER = 0x08
};

/* "cuda/ccuda.pxd":2345
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 0x08
 * 
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 0x10             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 0x20
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_DEPTH_TEXTURE = 0x10
};

/* "cuda/ccuda.pxd":2347
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 0x10
 * 
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 0x20             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_SPARSE = 0x40
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_COLOR_ATTACHMENT = 0x20
};

/* "cuda/ccuda.pxd":2349
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 0x20
 * 
 * cdef enum: CUDA_ARRAY3D_SPARSE = 0x40             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_SPARSE = 0x40
};

/* "cuda/ccuda.pxd":2351
 * cdef enum: CUDA_ARRAY3D_SPARSE = 0x40
 * 
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSA_OVERRIDE_FORMAT = 0x01
};

/* "cuda/ccuda.pxd":2353
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 0x01
 * 
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 0x02
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_READ_AS_INTEGER = 0x01
};

/* "cuda/ccuda.pxd":2355
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 0x01
 * 
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_SRGB = 0x10
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_NORMALIZED_COORDINATES = 0x02
};

/* "cuda/ccuda.pxd":2357
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 0x02
 * 
 * cdef enum: CU_TRSF_SRGB = 0x10             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 0x20
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_SRGB = 0x10
};

/* "cuda/ccuda.pxd":2359
 * cdef enum: CU_TRSF_SRGB = 0x10
 * 
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 0x20             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_END = 0x00
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 0x20
};

/* "cuda/ccuda.pxd":2361
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 0x20
 * 
 * cdef enum: CU_LAUNCH_PARAM_END = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 0x01
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END = 0x00
};

/* "cuda/ccuda.pxd":2363
 * cdef enum: CU_LAUNCH_PARAM_END = 0x00
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 0x02
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER = 0x01
};

/* "cuda/ccuda.pxd":2365
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 0x01
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_PARAM_TR_DEFAULT = -1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_SIZE = 0x02
};

/* "cuda/ccuda.pxd":2367
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 0x02
 * 
 * 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":2369
 * 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":2371
 * cdef enum: CU_DEVICE_CPU = -1
 * 
 * cdef enum: CU_DEVICE_INVALID = -2             # <<<<<<<<<<<<<<
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_INVALID = -2L
};

/* "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 = 0x1
 * 
 * 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 = 0x4
 * 
 * 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 = 0x1f
 * 
 * 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 = 0x1
 * 
 * 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 = 0x4
 * 
 * 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 = 0x1
 * 
 * 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 = 0x1
 * 
 * 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 = 1<<30
 * 
 * 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 = 0x1
 * 
 * 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 = 0x1
 * 
 * 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 = 0x1
 * 
 * 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 = 0x9e
 * 
 * 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":432
 *     CU_DEVICE_ATTRIBUTE_MAX
 * 
 * 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":434
 * 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":446
 *     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":448
 * 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":469
 *     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":484
 *     CU_FUNC_ATTRIBUTE_MAX
 * 
 * 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":492
 *     CU_FUNC_CACHE_PREFER_EQUAL = 0x03
 * 
 * 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":499
 *     CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 0x02
 * 
 * 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":506
 *     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":514
 *     CU_MEMORYTYPE_UNIFIED = 0x04
 * 
 * ctypedef CUmemorytype_enum CUmemorytype             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUcomputemode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum __pyx_t_4cuda_5ccuda_CUmemorytype;

/* "cuda/ccuda.pxd":521
 *     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":531
 *     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":539
 *     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":569
 *     CU_JIT_NUM_OPTIONS
 * 
 * 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":590
 *     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":596
 *     CU_PREFER_BINARY
 * 
 * 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":603
 *     CU_JIT_CACHE_OPTION_CA
 * 
 * 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":614
 *     CU_JIT_NUM_INPUT_TYPES
 * 
 * ctypedef CUjitInputType_enum CUjitInputType             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjitInputType_enum __pyx_t_4cuda_5ccuda_CUjitInputType;

/* "cuda/ccuda.pxd":619
 *     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":628
 *     CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 0x08
 * 
 * ctypedef CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphicsMapResourceFlags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags_enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags;

/* "cuda/ccuda.pxd":635
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 0x02
 * 
 * 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":645
 *     CU_CUBEMAP_FACE_NEGATIVE_Z = 0x05
 * 
 * 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":657
 *     CU_LIMIT_MAX
 * 
 * ctypedef CUlimit_enum CUlimit             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUresourcetype_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUlimit_enum __pyx_t_4cuda_5ccuda_CUlimit;

/* "cuda/ccuda.pxd":665
 *     CU_RESOURCE_TYPE_PITCH2D = 0x03
 * 
 * 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":667
 * ctypedef CUresourcetype_enum CUresourcetype
 * 
 * ctypedef void (*CUhostFn)(void* userData)             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUaccessProperty_enum:
 */
typedef void (*__pyx_t_4cuda_5ccuda_CUhostFn)(void *);

/* "cuda/ccuda.pxd":674
 *     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":676
 * 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":683
 *     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":685
 * 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":687
 * 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":699
 *     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":701
 * 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":703
 * 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":711
 *     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":713
 * 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":715
 * 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":719
 *     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":721
 * 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":737
 *     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":745
 *     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":751
 *     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":753
 * 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":757
 *     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":759
 * 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":766
 *     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":773
 *     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":779
 *     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":781
 * 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":785
 *     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":787
 * 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":794
 *     CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = 1 << 1
 * 
 * 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":800
 *     CU_EXEC_AFFINITY_TYPE_MAX
 * 
 * ctypedef CUexecAffinityType_enum CUexecAffinityType             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUexecAffinitySmCount_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUexecAffinityType_enum __pyx_t_4cuda_5ccuda_CUexecAffinityType;

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

/* "cuda/ccuda.pxd":805
 *     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":807
 * 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":809
 * 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":812
 *     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":816
 *     _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":818
 * 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":909
 *     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":918
 *     CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 0x04
 * 
 * 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":920
 * 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":922
 * 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":924
 * 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":942
 *     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":944
 * 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":946
 * 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":973
 *     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":975
 * 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":977
 * 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":1004
 *     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":1006
 * 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":1008
 * 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":1014
 *     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":1016
 * 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":1018
 * 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":1026
 *     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":1028
 * 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":1030
 * 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":1035
 *     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":1042
 *     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":1044
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_st CUDA_ARRAY_SPARSE_PROPERTIES_v1
 * 
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES             # <<<<<<<<<<<<<<
 * 
 * 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_SPARSE_PROPERTIES_v1 __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES;

/* "cuda/ccuda.pxd":1046
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES
 * 
 * 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":1049
 *     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":1052
 *     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":1058
 *     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":1066
 *     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":1069
 *     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":1076
 *     _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":1081
 *     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":1083
 * 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":1085
 * 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":1097
 *     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":1099
 * 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":1138
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22
 * 
 * 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":1140
 * 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":1151
 *     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":1153
 * 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":1155
 * 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":1159
 *     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":1161
 * 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":1168
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = 0x3
 * 
 * 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":1170
 * 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":1182
 *     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":1184
 * 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":1196
 *     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":1198
 * 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":1202
 *     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":1207
 *     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":1214
 *     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":1216
 * 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":1218
 * 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":1224
 *     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":1226
 * 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":1228
 * 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":1234
 *     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":1236
 * 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":1250
 *     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":1252
 * 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":1256
 *     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":1261
 *     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":1267
 *     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":1269
 * 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":1271
 * 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":1274
 *     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":1278
 *     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":1281
 *     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":1287
 *     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":1292
 *     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":1294
 * 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":1296
 * 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":1299
 *     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":1303
 *     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":1307
 *     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":1313
 *     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":1318
 *     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":1320
 * 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":1322
 * 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":1327
 *     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":1329
 * 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":1331
 * 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":1336
 *     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":1338
 * 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":1351
 *     CU_MEM_HANDLE_TYPE_MAX = 0x7FFFFFFF
 * 
 * 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":1359
 *     CU_MEM_ACCESS_FLAGS_PROT_MAX = 0x7FFFFFFF
 * 
 * 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":1366
 *     CU_MEM_LOCATION_TYPE_MAX = 0x7FFFFFFF
 * 
 * ctypedef CUmemLocationType_enum CUmemLocationType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemLocationType_enum __pyx_t_4cuda_5ccuda_CUmemLocationType;

/* "cuda/ccuda.pxd":1373
 *     CU_MEM_ALLOCATION_TYPE_MAX = 0x7FFFFFFF
 * 
 * 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":1379
 *     CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 0x1
 * 
 * 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":1385
 *     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":1391
 *     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":1396
 *     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":1398
 * 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":1402
 *     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":1412
 *     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":1417
 *     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":1421
 *     _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":1424
 *     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":1437
 *     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":1439
 * 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":1441
 * 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":1445
 *     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":1447
 * 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":1453
 *     CU_MEM_ALLOCATION_COMP_GENERIC = 0x1
 * 
 * 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":1455
 * 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":1461
 *     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":1468
 *     _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":1470
 * 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":1472
 * 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":1476
 *     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":1478
 * 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":1490
 *     CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = 0x7
 * 
 * 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":1502
 *     CU_MEMPOOL_ATTR_USED_MEM_HIGH
 * 
 * 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":1504
 * 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":1511
 *     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":1513
 * 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":1515
 * 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":1518
 *     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":1520
 * 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":1522
 * 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":1529
 *     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":1537
 *     CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH
 * 
 * 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":1543
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 1<<1
 * 
 * ctypedef CUflushGPUDirectRDMAWritesOptions_enum CUflushGPUDirectRDMAWritesOptions             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUGPUDirectRDMAWritesOrdering_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions_enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions;

/* "cuda/ccuda.pxd":1550
 *     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":1556
 *     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":1561
 *     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":1578
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = 1<<12
 * 
 * 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":1583
 *     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":1588
 *     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":1593
 *     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;

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

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

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

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

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


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

/* Module declarations from 'cuda.ccuda' */

/* 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___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___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 __pyx_t_4cuda_5ccuda_CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(char const *, void **, int, __pyx_t_4cuda_5ccuda_cuuint64_t); /*proto*/
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_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_import[] = "__import__";
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_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_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_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_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_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_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_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_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_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_cuWaitExternalSemaphore[] = "Function \"cuWaitExternalSemaphoresAsync\" not found";
static const char __pyx_k_Function_cuStreamGetCaptureInfo_2[] = "Function \"cuStreamGetCaptureInfo_v2\" 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_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_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_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_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_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_cuGraphNodeGetType_not;
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_cuGraphicsMapResources;
static PyObject *__pyx_kp_u_Function_cuGraphicsResourceGetMa;
static PyObject *__pyx_kp_u_Function_cuGraphicsResourceGetMa_2;
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_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_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_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_cuWaitExternalSemaphore;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_encoding;
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_sys;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_u_utf_8;
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;
/* Late includes */

/* "cuda/_cuda/ccuda.pyx":368
 * cdef void *__cuGetExportTable = NULL
 * 
 * cdef int cuPythonInit() nogil except -1:             # <<<<<<<<<<<<<<
 *     global __cuPythonInit
 *     if __cuPythonInit:
 */

static int __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(void) {
  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;
  int __pyx_t_4;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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], 368, 1, __PYX_ERR(0, 368, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":370
 * cdef int cuPythonInit() nogil except -1:
 *     global __cuPythonInit
 *     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":371
 *     global __cuPythonInit
 *     if __cuPythonInit:
 *         return 0             # <<<<<<<<<<<<<<
 *     __cuPythonInit = True
 *     cdef char libPath[260]
 */
      __pyx_r = 0;
      goto __pyx_L3_return;

      /* "cuda/_cuda/ccuda.pyx":370
 * cdef int cuPythonInit() nogil except -1:
 *     global __cuPythonInit
 *     if __cuPythonInit:             # <<<<<<<<<<<<<<
 *         return 0
 *     __cuPythonInit = True
 */
    }

    /* "cuda/_cuda/ccuda.pyx":372
 *     if __cuPythonInit:
 *         return 0
 *     __cuPythonInit = True             # <<<<<<<<<<<<<<
 *     cdef char libPath[260]
 *     libPath[0] = 0
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuPythonInit = 1;

    /* "cuda/_cuda/ccuda.pyx":374
 *     __cuPythonInit = True
 *     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":375
 *     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":376
 *     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_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_4294967296, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_status = getCUDALibraryPath(__pyx_v_libPath, __pyx_t_1);

          /* "cuda/_cuda/ccuda.pyx":377
 *     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_4 = ((__pyx_v_status == 0) != 0);
          if (__pyx_t_4) {
          } else {
            __pyx_t_1 = __pyx_t_4;
            goto __pyx_L11_bool_binop_done;
          }
          __pyx_t_5 = strlen(__pyx_v_libPath); 
          __pyx_t_4 = ((__pyx_t_5 != 0) != 0);
          __pyx_t_1 = __pyx_t_4;
          __pyx_L11_bool_binop_done:;
          if (__pyx_t_1) {

            /* "cuda/_cuda/ccuda.pyx":378
 *         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_2 = __Pyx_decode_c_string(__pyx_v_libPath, 0, strlen(__pyx_v_libPath), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_v_path = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "cuda/_cuda/ccuda.pyx":377
 *     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_L10;
          }

          /* "cuda/_cuda/ccuda.pyx":383
 *                 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_L10:;

          /* "cuda/_cuda/ccuda.pyx":392
 *                 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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
          __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_kp_u_utf_8) < 0) __PYX_ERR(0, 392, __pyx_L8_error)
          __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_7 = __Pyx_PyBytes_AsString(__pyx_t_6); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L8_error)
          __pyx_v_handle = dlopen(__pyx_t_7, RTLD_NOW);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

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

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

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

        /* "cuda/_cuda/ccuda.pyx":375
 *     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_L9;
          }
          __pyx_L8_error: {
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
          __pyx_L9:;
        }
    }

    /* "cuda/_cuda/ccuda.pyx":754
 *                 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":756
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 * 
 *     if __cuGetProcAddress != NULL:             # <<<<<<<<<<<<<<
 *         # All cuGetProcAddress calls
 *         _cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, 0)
 */
    __pyx_t_1 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress != NULL) != 0);
    if (__pyx_t_1) {

      /* "cuda/_cuda/ccuda.pyx":758
 *     if __cuGetProcAddress != NULL:
 *         # All cuGetProcAddress calls
 *         _cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, 0)
 *         _cuGetProcAddress('cuInit', &__cuInit, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGetErrorString"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString), 0x1770, 0); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 758, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":759
 *         # All cuGetProcAddress calls
 *         _cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, 0)
 *         _cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuInit', &__cuInit, 2000, 0)
 *         _cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGetErrorName"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName), 0x1770, 0); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 759, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":814
 *         _cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, 0)
 *         _cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, 0)
 *         _cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuModuleGetSurfRef"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef), 0xBB8, 0); 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
 *         _cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, 0)
 *         _cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, 0)
 *         _cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLinkCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2), 0x17A2, 0); 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('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, 0)
 *         _cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLinkAddData"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2), 0x17A2, 0); 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('cuLinkCreate', &__cuLinkCreate_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, 0)
 *         _cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLinkAddFile"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2), 0x17A2, 0); 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('cuLinkAddData', &__cuLinkAddData_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, 0)
 *         _cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLinkComplete"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete), 0x13BA, 0); 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('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, 0)
 *         _cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, 0)
 *         _cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLinkDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy), 0x13BA, 0); 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('cuLinkComplete', &__cuLinkComplete, 5050, 0)
 *         _cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, 0)
 *         _cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemGetInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2), 0xBCC, 0); 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('cuLinkDestroy', &__cuLinkDestroy, 5050, 0)
 *         _cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAlloc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2), 0xBCC, 0); 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('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAllocPitch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2), 0xBCC, 0); 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('cuMemAlloc', &__cuMemAlloc_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemFree"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2), 0xBCC, 0); 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('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemGetAddressRange"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2), 0xBCC, 0); 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('cuMemFree', &__cuMemFree_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, 0)
 *         _cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAllocHost"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2), 0xBCC, 0); 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('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, 0)
 *         _cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemFreeHost"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost), 0x7D0, 0); 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('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, 0)
 *         _cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemHostAlloc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc), 0x7E4, 0); 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('cuMemFreeHost', &__cuMemFreeHost, 2000, 0)
 *         _cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, 0)
 *         _cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, 0)
 *         _cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemHostGetDevicePointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2), 0xBCC, 0); 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('cuMemHostAlloc', &__cuMemHostAlloc, 2020, 0)
 *         _cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, 0)
 *         _cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemHostGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags), 0x7EE, 0); 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('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, 0)
 *         _cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, 0)
 *         _cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAllocManaged"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged), 0x1770, 0); 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('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, 0)
 *         _cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, 0)
 *         _cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, 0)
 *         _cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDeviceGetByPCIBusId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId), 0xFAA, 0); 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('cuMemAllocManaged', &__cuMemAllocManaged, 6000, 0)
 *         _cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, 0)
 *         _cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDeviceGetPCIBusId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId), 0xFAA, 0); 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('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, 0)
 *         _cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, 0)
 *         _cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuIpcGetEventHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle), 0xFAA, 0); 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('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, 0)
 *         _cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuIpcOpenEventHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle), 0xFAA, 0); 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('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, 0)
 *         _cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuIpcGetMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle), 0xFAA, 0); 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('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, 0)
 *         _cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuIpcOpenMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2), 0x2AF8, 0); 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('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, 0)
 *         _cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, 0)
 *         _cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, 0)
 *         _cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuIpcCloseMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle), 0xFAA, 0); 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('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, 0)
 *         _cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, 0)
 *         _cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, 0)
 *         _cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemHostRegister"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2), 0x17A2, 0); 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('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, 0)
 *         _cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, 0)
 *         _cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemHostUnregister"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister), 0xFA0, 0); 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('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, 0)
 *         _cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, 0)
 *         _cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy), 0xFA0, 0); 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('cuMemHostUnregister', &__cuMemHostUnregister, 4000, 0)
 *         _cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer), 0xFA0, 0); 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('cuMemcpy', &__cuMemcpy, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyHtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2), 0xBCC, 0); 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('cuMemcpyPeer', &__cuMemcpyPeer, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyDtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2), 0xBCC, 0); 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('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyDtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2), 0xBCC, 0); 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('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyDtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2), 0xBCC, 0); 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('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyAtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2), 0xBCC, 0); 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('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyHtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2), 0xBCC, 0); 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('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyAtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2), 0xBCC, 0); 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('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyAtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2), 0xBCC, 0); 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('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpy2D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2), 0xBCC, 0); 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('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpy2DUnaligned"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2), 0xBCC, 0); 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('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpy3D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2), 0xBCC, 0); 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('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpy3DPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer), 0xFA0, 0); 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('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync), 0xFA0, 0); 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('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync), 0xFA0, 0); 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('cuMemcpyAsync', &__cuMemcpyAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyHtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2), 0xBCC, 0); 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('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyDtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2), 0xBCC, 0); 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('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyDtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2), 0xBCC, 0); 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('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyHtoAAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2), 0xBCC, 0); 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('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpyAtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2), 0xBCC, 0); 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('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpy2DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2), 0xBCC, 0); 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('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpy3DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2), 0xBCC, 0); 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('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemcpy3DPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync), 0xFA0, 0); 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('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2), 0xBCC, 0); 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('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, 0)
 *         _cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2), 0xBCC, 0); 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('cuMemsetD8', &__cuMemsetD8_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2), 0xBCC, 0); 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('cuMemsetD16', &__cuMemsetD16_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD2D8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2), 0xBCC, 0); 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('cuMemsetD32', &__cuMemsetD32_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD2D16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2), 0xBCC, 0); 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('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD2D32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2), 0xBCC, 0); 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('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async), 0xBCC, 0); 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('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async), 0xBCC, 0); 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('cuMemsetD8Async', &__cuMemsetD8Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async), 0xBCC, 0); 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('cuMemsetD16Async', &__cuMemsetD16Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD2D8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async), 0xBCC, 0); 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('cuMemsetD32Async', &__cuMemsetD32Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, 0)
 *         _cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD2D16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async), 0xBCC, 0); 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('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, 0)
 *         _cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemsetD2D32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async), 0xBCC, 0); 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('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, 0)
 *         _cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, 0)
 *         _cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, 0)
 *         _cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuArrayCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2), 0xBCC, 0); 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('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, 0)
 *         _cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, 0)
 *         _cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, 0)
 *         _cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuArrayGetDescriptor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2), 0xBCC, 0); 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('cuArrayCreate', &__cuArrayCreate_v2, 3020, 0)
 *         _cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, 0)
 *         _cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, 0)
 *         _cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuArrayGetSparseProperties"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties), 0x2B02, 0); 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('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, 0)
 *         _cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, 0)
 *         _cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, 0)
 *         _cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMipmappedArrayGetSparseProperties"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties), 0x2B02, 0); 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('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, 0)
 *         _cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, 0)
 *         _cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, 0)
 *         _cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuArrayGetPlane"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane), 0x2B0C, 0); 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('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, 0)
 *         _cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, 0)
 *         _cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, 0)
 *         _cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuArrayDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy), 0x7D0, 0); 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('cuArrayGetPlane', &__cuArrayGetPlane, 11020, 0)
 *         _cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, 0)
 *         _cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, 0)
 *         _cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuArray3DCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2), 0xBCC, 0); 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('cuArrayDestroy', &__cuArrayDestroy, 2000, 0)
 *         _cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, 0)
 *         _cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, 0)
 *         _cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuArray3DGetDescriptor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2), 0xBCC, 0); 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('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, 0)
 *         _cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, 0)
 *         _cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, 0)
 *         _cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMipmappedArrayCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate), 0x1388, 0); 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('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, 0)
 *         _cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, 0)
 *         _cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, 0)
 *         _cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMipmappedArrayGetLevel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel), 0x1388, 0); 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('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, 0)
 *         _cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, 0)
 *         _cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, 0)
 *         _cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMipmappedArrayDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy), 0x1388, 0); 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('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, 0)
 *         _cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, 0)
 *         _cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, 0)
 *         _cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAddressReserve"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve), 0x2724, 0); 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":888
 *         _cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, 0)
 *         _cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, 0)
 *         _cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, 0)
 *         _cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAddressFree"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree), 0x2724, 0); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 888, __pyx_L4_error)

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

      /* "cuda/_cuda/ccuda.pyx":890
 *         _cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, 0)
 *         _cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, 0)
 *         _cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, 0)
 *         _cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemRelease"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease), 0x2724, 0); 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
 *         _cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, 0)
 *         _cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, 0)
 *         _cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, 0)
 *         _cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemMap"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemMap), 0x2724, 0); 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('cuMemRelease', &__cuMemRelease, 10020, 0)
 *         _cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, 0)
 *         _cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, 0)
 *         _cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemMapArrayAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync), 0x2B02, 0); 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('cuMemMap', &__cuMemMap, 10020, 0)
 *         _cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, 0)
 *         _cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemUnmap"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap), 0x2724, 0); 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('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, 0)
 *         _cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, 0)
 *         _cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, 0)
 *         _cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemSetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess), 0x2724, 0); 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('cuMemUnmap', &__cuMemUnmap, 10020, 0)
 *         _cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemGetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess), 0x2724, 0); 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('cuMemSetAccess', &__cuMemSetAccess, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, 0)
 *         _cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemExportToShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle), 0x2724, 0); 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('cuMemGetAccess', &__cuMemGetAccess, 10020, 0)
 *         _cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemImportFromShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle), 0x2724, 0); 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('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemGetAllocationGranularity"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity), 0x2724, 0); 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('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, 0)
 *         _cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemGetAllocationPropertiesFromHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle), 0x2724, 0); 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('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, 0)
 *         _cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemRetainAllocationHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle), 0x2AF8, 0); 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('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, 0)
 *         _cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, 0)
 *         _cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemFreeAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync), 0x2B0C, 0); 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('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, 0)
 *         _cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAllocAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync), 0x2B0C, 0); 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('cuMemFreeAsync', &__cuMemFreeAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolTrimTo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo), 0x2B0C, 0); 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('cuMemAllocAsync', &__cuMemAllocAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute), 0x2B0C, 0); 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('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute), 0x2B0C, 0); 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('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolSetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess), 0x2B0C, 0); 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('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolGetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess), 0x2B0C, 0); 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('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, 0)
 *         _cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate), 0x2B0C, 0); 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('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy), 0x2B0C, 0); 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('cuMemPoolCreate', &__cuMemPoolCreate, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, 0)
 *         _cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAllocFromPoolAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync), 0x2B0C, 0); 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('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, 0)
 *         _cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolExportToShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle), 0x2B0C, 0); 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('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolImportFromShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle), 0x2B0C, 0); 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('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, 0)
 *         _cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolExportPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer), 0x2B0C, 0); 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('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, 0)
 *         _cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPoolImportPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer), 0x2B0C, 0); 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('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, 0)
 *         _cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, 0)
 *         _cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, 0)
 *         _cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuPointerGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute), 0xFA0, 0); 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('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, 0)
 *         _cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, 0)
 *         _cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, 0)
 *         _cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync), 0x1F40, 0); 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('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, 0)
 *         _cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, 0)
 *         _cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, 0)
 *         _cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemAdvise"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise), 0x1F40, 0); 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('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, 0)
 *         _cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, 0)
 *         _cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, 0)
 *         _cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemRangeGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute), 0x1F40, 0); 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('cuMemAdvise', &__cuMemAdvise, 8000, 0)
 *         _cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, 0)
 *         _cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, 0)
 *         _cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuMemRangeGetAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes), 0x1F40, 0); 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('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, 0)
 *         _cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, 0)
 *         _cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, 0)
 *         _cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuPointerSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute), 0x1770, 0); 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('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, 0)
 *         _cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, 0)
 *         _cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, 0)
 *         _cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuPointerGetAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes), 0x1B58, 0); 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('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, 0)
 *         _cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, 0)
 *         _cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate), 0x7D0, 0); 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('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, 0)
 *         _cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, 0)
 *         _cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamCreateWithPriority"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority), 0x13BA, 0); 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('cuStreamCreate', &__cuStreamCreate, 2000, 0)
 *         _cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamGetPriority"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority), 0x13BA, 0); 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('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, 0)
 *         _cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags), 0x13BA, 0); 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('cuStreamGetPriority', &__cuStreamGetPriority, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, 0)
 *         _cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx), 0x233C, 0); 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('cuStreamGetFlags', &__cuStreamGetFlags, 5050, 0)
 *         _cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, 0)
 *         _cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, 0)
 *         _cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamWaitEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent), 0xBCC, 0); 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('cuStreamGetCtx', &__cuStreamGetCtx, 9020, 0)
 *         _cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, 0)
 *         _cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, 0)
 *         _cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamAddCallback"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback), 0x1388, 0); 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('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, 0)
 *         _cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, 0)
 *         _cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, 0)
 *         _cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamBeginCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2), 0x271A, 0); 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('cuStreamAddCallback', &__cuStreamAddCallback, 5000, 0)
 *         _cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, 0)
 *         _cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, 0)
 *         _cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuThreadExchangeStreamCaptureMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode), 0x271A, 0); 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('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, 0)
 *         _cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, 0)
 *         _cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, 0)
 *         _cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamEndCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture), 0x2710, 0); 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('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, 0)
 *         _cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, 0)
 *         _cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, 0)
 *         _cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamIsCapturing"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing), 0x2710, 0); 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('cuStreamEndCapture', &__cuStreamEndCapture, 10000, 0)
 *         _cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, 0)
 *         _cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, 0)
 *         _cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo), 0x271A, 0); 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('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, 0)
 *         _cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, 0)
 *         _cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, 0)
 *         _cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2), 0x2B16, 0); 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('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, 0)
 *         _cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, 0)
 *         _cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, 0)
 *         _cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies), 0x2B16, 0); 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('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, 0)
 *         _cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, 0)
 *         _cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, 0)
 *         _cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamAttachMemAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync), 0x1770, 0); 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('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, 0)
 *         _cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, 0)
 *         _cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, 0)
 *         _cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamQuery"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery), 0x7D0, 0); 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('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, 0)
 *         _cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, 0)
 *         _cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, 0)
 *         _cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize), 0x7D0, 0); 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('cuStreamQuery', &__cuStreamQuery, 2000, 0)
 *         _cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, 0)
 *         _cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, 0)
 *         _cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2), 0xFA0, 0); 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('cuStreamSynchronize', &__cuStreamSynchronize, 2000, 0)
 *         _cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, 0)
 *         _cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamCopyAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes), 0x2AF8, 0); 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('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, 0)
 *         _cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, 0)
 *         _cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute), 0x2AF8, 0); 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('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, 0)
 *         _cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, 0)
 *         _cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute), 0x2AF8, 0); 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('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, 0)
 *         _cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuEventCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate), 0x7D0, 0); 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('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, 0)
 *         _cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, 0)
 *         _cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuEventRecord"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord), 0x7D0, 0); 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('cuEventCreate', &__cuEventCreate, 2000, 0)
 *         _cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, 0)
 *         _cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, 0)
 *         _cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuEventRecordWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags), 0x2B02, 0); 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('cuEventRecord', &__cuEventRecord, 2000, 0)
 *         _cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, 0)
 *         _cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, 0)
 *         _cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuEventQuery"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery), 0x7D0, 0); 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('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, 0)
 *         _cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, 0)
 *         _cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, 0)
 *         _cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuEventSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize), 0x7D0, 0); 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('cuEventQuery', &__cuEventQuery, 2000, 0)
 *         _cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, 0)
 *         _cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, 0)
 *         _cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuEventDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2), 0xFA0, 0); 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('cuEventSynchronize', &__cuEventSynchronize, 2000, 0)
 *         _cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, 0)
 *         _cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, 0)
 *         _cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuEventElapsedTime"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime), 0x7D0, 0); 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('cuEventDestroy', &__cuEventDestroy_v2, 4000, 0)
 *         _cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, 0)
 *         _cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, 0)
 *         _cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuImportExternalMemory"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory), 0x2710, 0); 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('cuEventElapsedTime', &__cuEventElapsedTime, 2000, 0)
 *         _cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, 0)
 *         _cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, 0)
 *         _cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuExternalMemoryGetMappedBuffer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer), 0x2710, 0); 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('cuImportExternalMemory', &__cuImportExternalMemory, 10000, 0)
 *         _cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, 0)
 *         _cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, 0)
 *         _cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuExternalMemoryGetMappedMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray), 0x2710, 0); 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('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, 0)
 *         _cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, 0)
 *         _cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, 0)
 *         _cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDestroyExternalMemory"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory), 0x2710, 0); 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('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, 0)
 *         _cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, 0)
 *         _cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, 0)
 *         _cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuImportExternalSemaphore"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore), 0x2710, 0); 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('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, 0)
 *         _cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, 0)
 *         _cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, 0)
 *         _cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuSignalExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync), 0x2710, 0); 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('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, 0)
 *         _cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, 0)
 *         _cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, 0)
 *         _cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuWaitExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync), 0x2710, 0); 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('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, 0)
 *         _cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, 0)
 *         _cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, 0)
 *         _cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDestroyExternalSemaphore"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore), 0x2710, 0); 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('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, 0)
 *         _cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, 0)
 *         _cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, 0)
 *         _cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32), 0x1F40, 0); 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('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, 0)
 *         _cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, 0)
 *         _cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, 0)
 *         _cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64), 0x2328, 0); 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('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, 0)
 *         _cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, 0)
 *         _cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, 0)
 *         _cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32), 0x1F40, 0); 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('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, 0)
 *         _cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, 0)
 *         _cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, 0)
 *         _cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64), 0x2328, 0); 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('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, 0)
 *         _cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, 0)
 *         _cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, 0)
 *         _cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp), 0x1F40, 0); 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('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, 0)
 *         _cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, 0)
 *         _cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, 0)
 *         _cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuFuncGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute), 0x7E4, 0); 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)

      /* "cuda/_cuda/ccuda.pyx":964
 *         _cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, 0)
 *         _cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, 0)
 *         _cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, 0)
 *         _cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuFuncSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute), 0x2328, 0); if (unlikely(__pyx_t_8 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 964, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":965
 *         _cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, 0)
 *         _cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, 0)
 *         _cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, 0)
 *         _cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuFuncSetCacheConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig), 0xBB8, 0); 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
 *         _cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, 0)
 *         _cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, 0)
 *         _cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, 0)
 *         _cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuFuncSetSharedMemConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig), 0xFB4, 0); 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('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, 0)
 *         _cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, 0)
 *         _cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, 0)
 *         _cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuFuncGetModule"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule), 0x2AF8, 0); 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('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, 0)
 *         _cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, 0)
 *         _cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, 0)
 *         _cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLaunchKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel), 0xFA0, 0); 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('cuFuncGetModule', &__cuFuncGetModule, 11000, 0)
 *         _cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, 0)
 *         _cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, 0)
 *         _cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLaunchCooperativeKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel), 0x2328, 0); 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('cuLaunchKernel', &__cuLaunchKernel, 4000, 0)
 *         _cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, 0)
 *         _cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, 0)
 *         _cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLaunchCooperativeKernelMultiDevice"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice), 0x2328, 0); 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('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, 0)
 *         _cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, 0)
 *         _cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, 0)
 *         _cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLaunchHostFunc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc), 0x2710, 0); 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('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, 0)
 *         _cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, 0)
 *         _cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, 0)
 *         _cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuFuncSetBlockShape"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape), 0x7D0, 0); 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('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, 0)
 *         _cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, 0)
 *         _cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, 0)
 *         _cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuFuncSetSharedSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize), 0x7D0, 0); 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('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, 0)
 *         _cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, 0)
 *         _cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, 0)
 *         _cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuParamSetSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize), 0x7D0, 0); 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('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, 0)
 *         _cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, 0)
 *         _cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, 0)
 *         _cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuParamSeti"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti), 0x7D0, 0); 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('cuParamSetSize', &__cuParamSetSize, 2000, 0)
 *         _cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, 0)
 *         _cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, 0)
 *         _cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuParamSetf"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf), 0x7D0, 0); 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('cuParamSeti', &__cuParamSeti, 2000, 0)
 *         _cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, 0)
 *         _cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, 0)
 *         _cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuParamSetv"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv), 0x7D0, 0); 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('cuParamSetf', &__cuParamSetf, 2000, 0)
 *         _cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, 0)
 *         _cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, 0)
 *         _cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLaunch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunch), 0x7D0, 0); 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('cuParamSetv', &__cuParamSetv, 2000, 0)
 *         _cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, 0)
 *         _cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, 0)
 *         _cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLaunchGrid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid), 0x7D0, 0); 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('cuLaunch', &__cuLaunch, 2000, 0)
 *         _cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, 0)
 *         _cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, 0)
 *         _cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuLaunchGridAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync), 0x7D0, 0); 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('cuLaunchGrid', &__cuLaunchGrid, 2000, 0)
 *         _cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, 0)
 *         _cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuParamSetTexRef"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef), 0x7D0, 0); 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('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, 0)
 *         _cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, 0)
 *         _cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate), 0x2710, 0); 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('cuParamSetTexRef', &__cuParamSetTexRef, 2000, 0)
 *         _cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddKernelNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode), 0x2710, 0); 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('cuGraphCreate', &__cuGraphCreate, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphKernelNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams), 0x2710, 0); 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('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphKernelNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams), 0x2710, 0); 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('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddMemcpyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode), 0x2710, 0); 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('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphMemcpyNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams), 0x2710, 0); 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('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphMemcpyNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams), 0x2710, 0); 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('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddMemsetNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode), 0x2710, 0); 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('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphMemsetNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams), 0x2710, 0); 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('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphMemsetNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams), 0x2710, 0); 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('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddHostNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode), 0x2710, 0); 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('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphHostNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams), 0x2710, 0); 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('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphHostNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams), 0x2710, 0); 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('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddChildGraphNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode), 0x2710, 0); 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('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphChildGraphNodeGetGraph"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph), 0x2710, 0); 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('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddEmptyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode), 0x2710, 0); 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('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddEventRecordNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode), 0x2B02, 0); 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('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphEventRecordNodeGetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent), 0x2B02, 0); 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('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphEventRecordNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent), 0x2B02, 0); 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('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddEventWaitNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode), 0x2B02, 0); 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('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphEventWaitNodeGetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent), 0x2B02, 0); 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('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphEventWaitNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent), 0x2B02, 0); 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('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddExternalSemaphoresSignalNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode), 0x2B0C, 0); 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('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresSignalNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams), 0x2B0C, 0); 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('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresSignalNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams), 0x2B0C, 0); 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('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddExternalSemaphoresWaitNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode), 0x2B0C, 0); 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('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresWaitNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams), 0x2B0C, 0); 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('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, 0)
 *         _cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresWaitNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams), 0x2B0C, 0); 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('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, 0)
 *         _cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddMemAllocNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode), 0x2B20, 0); 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('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, 0)
 *         _cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, 0)
 *         _cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphMemAllocNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams), 0x2B20, 0); 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('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, 0)
 *         _cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, 0)
 *         _cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, 0)
 *         _cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddMemFreeNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode), 0x2B20, 0); 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('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, 0)
 *         _cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, 0)
 *         _cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, 0)
 *         _cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphMemFreeNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams), 0x2B20, 0); 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('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, 0)
 *         _cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, 0)
 *         _cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, 0)
 *         _cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDeviceGraphMemTrim"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim), 0x2B20, 0); 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('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, 0)
 *         _cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, 0)
 *         _cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, 0)
 *         _cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDeviceGetGraphMemAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute), 0x2B20, 0); 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('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, 0)
 *         _cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, 0)
 *         _cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDeviceSetGraphMemAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute), 0x2B20, 0); 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('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, 0)
 *         _cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, 0)
 *         _cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphClone"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone), 0x2710, 0); 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('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, 0)
 *         _cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphNodeFindInClone"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone), 0x2710, 0); 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('cuGraphClone', &__cuGraphClone, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphNodeGetType"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType), 0x2710, 0); 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('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphGetNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes), 0x2710, 0); 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('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphGetRootNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes), 0x2710, 0); 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('cuGraphGetNodes', &__cuGraphGetNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphGetEdges"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges), 0x2710, 0); 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('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphNodeGetDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies), 0x2710, 0); 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('cuGraphGetEdges', &__cuGraphGetEdges, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphNodeGetDependentNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes), 0x2710, 0); 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('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphAddDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies), 0x2710, 0); 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('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, 0)
 *         _cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphRemoveDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies), 0x2710, 0); 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('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, 0)
 *         _cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphDestroyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode), 0x2710, 0); 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('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, 0)
 *         _cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, 0)
 *         _cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphInstantiate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiate_v2), 0x2AF8, 0); 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('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, 0)
 *         _cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, 0)
 *         _cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, 0)
 *         _cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphInstantiateWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags), 0x2B20, 0); 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('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, 0)
 *         _cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, 0)
 *         _cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecKernelNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams), 0x271A, 0); 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('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, 0)
 *         _cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, 0)
 *         _cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecMemcpyNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams), 0x2724, 0); 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('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, 0)
 *         _cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecMemsetNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams), 0x2724, 0); 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('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecHostNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams), 0x2724, 0); 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('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecChildGraphNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams), 0x2B02, 0); 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('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, 0)
 *         _cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecEventRecordNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent), 0x2B02, 0); 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('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecEventWaitNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent), 0x2B02, 0); 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('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecExternalSemaphoresSignalNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams), 0x2B0C, 0); 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('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, 0)
 *         _cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, 0)
 *         _cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecExternalSemaphoresWaitNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams), 0x2B0C, 0); 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('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, 0)
 *         _cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphUpload"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload), 0x2B02, 0); 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('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, 0)
 *         _cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, 0)
 *         _cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, 0)
 *         _cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphLaunch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch), 0x2710, 0); 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('cuGraphUpload', &__cuGraphUpload, 11010, 0)
 *         _cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, 0)
 *         _cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, 0)
 *         _cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy), 0x2710, 0); 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('cuGraphLaunch', &__cuGraphLaunch, 10000, 0)
 *         _cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, 0)
 *         _cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy), 0x2710, 0); 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('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, 0)
 *         _cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, 0)
 *         _cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphExecUpdate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate), 0x2724, 0); 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('cuGraphDestroy', &__cuGraphDestroy, 10000, 0)
 *         _cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphKernelNodeCopyAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes), 0x2AF8, 0); 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('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphKernelNodeGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute), 0x2AF8, 0); 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('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphKernelNodeSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute), 0x2AF8, 0); 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('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphDebugDotPrint"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint), 0x2B16, 0); 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('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, 0)
 *         _cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuUserObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate), 0x2B16, 0); 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('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, 0)
 *         _cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuUserObjectRetain"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain), 0x2B16, 0); 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('cuUserObjectCreate', &__cuUserObjectCreate, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, 0)
 *         _cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuUserObjectRelease"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease), 0x2B16, 0); 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('cuUserObjectRetain', &__cuUserObjectRetain, 11030, 0)
 *         _cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, 0)
 *         _cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, 0)
 *         _cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphRetainUserObject"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject), 0x2B16, 0); 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('cuUserObjectRelease', &__cuUserObjectRelease, 11030, 0)
 *         _cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, 0)
 *         _cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, 0)
 *         _cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphReleaseUserObject"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject), 0x2B16, 0); 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('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, 0)
 *         _cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, 0)
 *         _cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, 0)
 *         _cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor), 0x17A2, 0); 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('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, 0)
 *         _cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, 0)
 *         _cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, 0)
 *         _cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags), 0x1B58, 0); 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('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, 0)
 *         _cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, 0)
 *         _cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, 0)
 *         _cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuOccupancyMaxPotentialBlockSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize), 0x17A2, 0); 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('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, 0)
 *         _cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, 0)
 *         _cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, 0)
 *         _cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuOccupancyMaxPotentialBlockSizeWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags), 0x1B58, 0); 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('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, 0)
 *         _cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, 0)
 *         _cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuOccupancyAvailableDynamicSMemPerBlock"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock), 0x2724, 0); 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('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, 0)
 *         _cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, 0)
 *         _cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray), 0x7D0, 0); 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('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, 0)
 *         _cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, 0)
 *         _cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray), 0x1388, 0); 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('cuTexRefSetArray', &__cuTexRefSetArray, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, 0)
 *         _cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2), 0xBCC, 0); 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('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, 0)
 *         _cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetAddress2D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3), 0xFAA, 0); 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('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, 0)
 *         _cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, 0)
 *         _cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetFormat"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat), 0x7D0, 0); 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('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, 0)
 *         _cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetAddressMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode), 0x7D0, 0); 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('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode), 0x7D0, 0); 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('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetMipmapFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode), 0x1388, 0); 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('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetMipmapLevelBias"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias), 0x1388, 0); 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('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetMipmapLevelClamp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp), 0x1388, 0); 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('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, 0)
 *         _cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetMaxAnisotropy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy), 0x1388, 0); 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('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetBorderColor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor), 0x1F40, 0); 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('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, 0)
 *         _cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, 0)
 *         _cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, 0)
 *         _cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefSetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags), 0x7D0, 0); 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('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, 0)
 *         _cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2), 0xBCC, 0); 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('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, 0)
 *         _cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray), 0x7D0, 0); 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('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, 0)
 *         _cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray), 0x1388, 0); 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('cuTexRefGetArray', &__cuTexRefGetArray, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetAddressMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode), 0x7D0, 0); 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('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode), 0x7D0, 0); 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('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetFormat"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat), 0x7D0, 0); 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('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetMipmapFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode), 0x1388, 0); 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('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetMipmapLevelBias"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias), 0x1388, 0); 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('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetMipmapLevelClamp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp), 0x1388, 0); 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('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, 0)
 *         _cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetMaxAnisotropy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy), 0x1388, 0); 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('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, 0)
 *         _cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetBorderColor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor), 0x1F40, 0); 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('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, 0)
 *         _cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, 0)
 *         _cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, 0)
 *         _cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags), 0x7D0, 0); 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('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, 0)
 *         _cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, 0)
 *         _cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, 0)
 *         _cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate), 0x7D0, 0); 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('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, 0)
 *         _cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, 0)
 *         _cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, 0)
 *         _cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexRefDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy), 0x7D0, 0); 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('cuTexRefCreate', &__cuTexRefCreate, 2000, 0)
 *         _cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, 0)
 *         _cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, 0)
 *         _cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuSurfRefSetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray), 0xBB8, 0); 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('cuTexRefDestroy', &__cuTexRefDestroy, 2000, 0)
 *         _cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, 0)
 *         _cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuSurfRefGetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray), 0xBB8, 0); 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('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, 0)
 *         _cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, 0)
 *         _cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate), 0x1388, 0); 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('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, 0)
 *         _cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexObjectDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy), 0x1388, 0); 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('cuTexObjectCreate', &__cuTexObjectCreate, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexObjectGetResourceDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc), 0x1388, 0); 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('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexObjectGetTextureDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc), 0x1388, 0); 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('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuTexObjectGetResourceViewDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc), 0x1388, 0); 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('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, 0)
 *         _cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuSurfObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate), 0x1388, 0); 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('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, 0)
 *         _cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuSurfObjectDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy), 0x1388, 0); 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('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, 0)
 *         _cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuSurfObjectGetResourceDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc), 0x1388, 0); 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('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, 0)
 *         _cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, 0)
 *         _cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, 0)
 *         _cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDeviceCanAccessPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer), 0xFA0, 0); 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('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, 0)
 *         _cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, 0)
 *         _cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, 0)
 *         _cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuCtxEnablePeerAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess), 0xFA0, 0); 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('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, 0)
 *         _cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, 0)
 *         _cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, 0)
 *         _cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuCtxDisablePeerAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess), 0xFA0, 0); 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('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, 0)
 *         _cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, 0)
 *         _cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuDeviceGetP2PAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute), 0x1F40, 0); 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('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, 0)
 *         _cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, 0)
 *         _cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphicsUnregisterResource"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource), 0xBB8, 0); 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('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, 0)
 *         _cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphicsSubResourceGetMappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray), 0xBB8, 0); 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('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, 0)
 *         _cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphicsResourceGetMappedMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray), 0x1388, 0); 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('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, 0)
 *         _cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphicsResourceGetMappedPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2), 0xBCC, 0); 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('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, 0)
 *         _cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, 0)
 *         _cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphicsResourceSetMapFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2), 0x17A2, 0); 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('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, 0)
 *         _cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, 0)
 *         _cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, 0)
 *         _cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphicsMapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources), 0xBB8, 0); 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('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, 0)
 *         _cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, 0)
 *         _cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, 0)
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGraphicsUnmapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources), 0xBB8, 0); 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('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, 0)
 *         _cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, 0)
 *         _cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, 0)             # <<<<<<<<<<<<<<
 *         _cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, 0)
 *         return 0
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGetProcAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress), 0x2B16, 0); 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('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, 0)
 *         _cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, 0)
 *         _cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, 0)             # <<<<<<<<<<<<<<
 *         return 0
 *     # dlsym calls
 */
      __pyx_t_8 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(((char const *)"cuGetExportTable"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable), 0xBB8, 0); 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('cuGetProcAddress', &__cuGetProcAddress, 11030, 0)
 *         _cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, 0)
 *         return 0             # <<<<<<<<<<<<<<
 *     # dlsym calls
 *     IF UNAME_SYSNAME == "Windows":
 */
      __pyx_r = 0;
      goto __pyx_L3_return;

      /* "cuda/_cuda/ccuda.pyx":756
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 * 
 *     if __cuGetProcAddress != NULL:             # <<<<<<<<<<<<<<
 *         # All cuGetProcAddress calls
 *         _cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, 0)
 */
    }

    /* "cuda/_cuda/ccuda.pyx":2513
 *                 pass
 *     ELSE:
 *         __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":2514
 *     ELSE:
 *         __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":2515
 *         __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":2516
 *         __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":2517
 *         __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":2518
 *         __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":2519
 *         __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":2520
 *         __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":2521
 *         __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":2522
 *         __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":2523
 *         __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":2524
 *         __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":2525
 *         __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":2526
 *         __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":2527
 *         __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":2528
 *         __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":2529
 *         __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":2530
 *         __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":2531
 *         __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":2532
 *         __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":2533
 *         __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":2534
 *         __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":2535
 *         __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":2536
 *         __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":2537
 *         __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":2538
 *         __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":2539
 *         __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":2540
 *         __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":2541
 *         __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":2542
 *         __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":2543
 *         __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":2544
 *         __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":2545
 *         __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":2546
 *         __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":2547
 *         __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":2548
 *         __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":2549
 *         __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":2550
 *         __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":2551
 *         __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":2552
 *         __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":2553
 *         __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":2554
 *         __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":2555
 *         __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":2556
 *         __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":2557
 *         __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":2558
 *         __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":2559
 *         __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":2560
 *         __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":2561
 *         __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":2562
 *         __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":2563
 *         __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":2564
 *         __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":2565
 *         __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":2566
 *         __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":2567
 *         __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":2568
 *         __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":2569
 *         __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":2570
 *         __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":2571
 *         __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":2572
 *         __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":2573
 *         __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":2574
 *         __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":2575
 *         __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":2576
 *         __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":2577
 *         __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":2578
 *         __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":2579
 *         __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":2580
 *         __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":2581
 *         __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":2582
 *         __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":2583
 *         __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":2584
 *         __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":2585
 *         __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":2586
 *         __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":2587
 *         __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":2588
 *         __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":2589
 *         __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":2590
 *         __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":2591
 *         __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":2592
 *         __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":2593
 *         __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2')
 *         __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle')
 *         __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2')             # <<<<<<<<<<<<<<
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')
 *         __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemHostRegister_v2"));

    /* "cuda/_cuda/ccuda.pyx":2594
 *         __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle')
 *         __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2')
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')             # <<<<<<<<<<<<<<
 *         __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy')
 *         __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister = dlsym(__pyx_v_handle, ((char const *)"cuMemHostUnregister"));

    /* "cuda/_cuda/ccuda.pyx":2595
 *         __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2')
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')
 *         __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy')             # <<<<<<<<<<<<<<
 *         __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer')
 *         __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy"));

    /* "cuda/_cuda/ccuda.pyx":2596
 *         __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister')
 *         __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":2597
 *         __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":2598
 *         __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":2599
 *         __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":2600
 *         __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":2601
 *         __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":2602
 *         __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":2603
 *         __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":2604
 *         __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":2605
 *         __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":2606
 *         __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":2607
 *         __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":2608
 *         __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":2609
 *         __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":2610
 *         __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":2611
 *         __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":2612
 *         __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":2613
 *         __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":2614
 *         __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":2615
 *         __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":2616
 *         __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":2617
 *         __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":2618
 *         __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":2619
 *         __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":2620
 *         __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":2621
 *         __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":2622
 *         __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":2623
 *         __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":2624
 *         __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":2625
 *         __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":2626
 *         __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":2627
 *         __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":2628
 *         __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":2629
 *         __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async')
 *         __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async')
 *         __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async')             # <<<<<<<<<<<<<<
 *         __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')
 *         __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16Async"));

    /* "cuda/_cuda/ccuda.pyx":2630
 *         __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async')
 *         __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async')
 *         __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')             # <<<<<<<<<<<<<<
 *         __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2')
 *         __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32Async"));

    /* "cuda/_cuda/ccuda.pyx":2631
 *         __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async')
 *         __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')
 *         __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":2632
 *         __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async')
 *         __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":2633
 *         __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2')
 *         __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2')
 *         __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties')             # <<<<<<<<<<<<<<
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')
 *         __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetSparseProperties"));

    /* "cuda/_cuda/ccuda.pyx":2634
 *         __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2')
 *         __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties')
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')             # <<<<<<<<<<<<<<
 *         __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane')
 *         __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayGetSparseProperties"));

    /* "cuda/_cuda/ccuda.pyx":2635
 *         __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties')
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')
 *         __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":2636
 *         __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties')
 *         __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":2637
 *         __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":2638
 *         __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":2639
 *         __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":2640
 *         __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":2641
 *         __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":2642
 *         __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":2643
 *         __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":2644
 *         __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":2645
 *         __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree')
 *         __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate')
 *         __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease')             # <<<<<<<<<<<<<<
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')
 *         __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease = dlsym(__pyx_v_handle, ((char const *)"cuMemRelease"));

    /* "cuda/_cuda/ccuda.pyx":2646
 *         __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate')
 *         __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease')
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')             # <<<<<<<<<<<<<<
 *         __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')
 *         __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemMap = dlsym(__pyx_v_handle, ((char const *)"cuMemMap"));

    /* "cuda/_cuda/ccuda.pyx":2647
 *         __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease')
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')
 *         __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')             # <<<<<<<<<<<<<<
 *         __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap')
 *         __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemMapArrayAsync"));

    /* "cuda/_cuda/ccuda.pyx":2648
 *         __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap')
 *         __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')
 *         __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":2649
 *         __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync')
 *         __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":2650
 *         __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":2651
 *         __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":2652
 *         __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":2653
 *         __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":2654
 *         __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle')
 *         __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity')
 *         __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle')             # <<<<<<<<<<<<<<
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')
 *         __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAllocationPropertiesFromHandle"));

    /* "cuda/_cuda/ccuda.pyx":2655
 *         __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity')
 *         __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle')
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')             # <<<<<<<<<<<<<<
 *         __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')
 *         __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemRetainAllocationHandle"));

    /* "cuda/_cuda/ccuda.pyx":2656
 *         __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle')
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')
 *         __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')             # <<<<<<<<<<<<<<
 *         __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')
 *         __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemFreeAsync"));

    /* "cuda/_cuda/ccuda.pyx":2657
 *         __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle')
 *         __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')
 *         __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')             # <<<<<<<<<<<<<<
 *         __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo')
 *         __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocAsync"));

    /* "cuda/_cuda/ccuda.pyx":2658
 *         __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync')
 *         __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')
 *         __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":2659
 *         __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync')
 *         __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":2660
 *         __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":2661
 *         __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":2662
 *         __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":2663
 *         __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess')
 *         __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess')
 *         __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate')             # <<<<<<<<<<<<<<
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')
 *         __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolCreate"));

    /* "cuda/_cuda/ccuda.pyx":2664
 *         __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess')
 *         __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate')
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')             # <<<<<<<<<<<<<<
 *         __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')
 *         __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolDestroy"));

    /* "cuda/_cuda/ccuda.pyx":2665
 *         __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate')
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')
 *         __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')             # <<<<<<<<<<<<<<
 *         __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle')
 *         __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocFromPoolAsync"));

    /* "cuda/_cuda/ccuda.pyx":2666
 *         __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy')
 *         __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')
 *         __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":2667
 *         __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync')
 *         __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":2668
 *         __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":2669
 *         __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle')
 *         __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer')
 *         __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer')             # <<<<<<<<<<<<<<
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')
 *         __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolImportPointer"));

    /* "cuda/_cuda/ccuda.pyx":2670
 *         __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer')
 *         __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer')
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')             # <<<<<<<<<<<<<<
 *         __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')
 *         __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuPointerGetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":2671
 *         __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer')
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')
 *         __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')             # <<<<<<<<<<<<<<
 *         __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise')
 *         __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemPrefetchAsync"));

    /* "cuda/_cuda/ccuda.pyx":2672
 *         __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute')
 *         __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')
 *         __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":2673
 *         __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync')
 *         __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":2674
 *         __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":2675
 *         __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":2676
 *         __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":2677
 *         __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute')
 *         __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes')
 *         __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate')             # <<<<<<<<<<<<<<
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')
 *         __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate = dlsym(__pyx_v_handle, ((char const *)"cuStreamCreate"));

    /* "cuda/_cuda/ccuda.pyx":2678
 *         __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes')
 *         __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate')
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')             # <<<<<<<<<<<<<<
 *         __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority')
 *         __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority = dlsym(__pyx_v_handle, ((char const *)"cuStreamCreateWithPriority"));

    /* "cuda/_cuda/ccuda.pyx":2679
 *         __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate')
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')
 *         __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":2680
 *         __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority')
 *         __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":2681
 *         __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":2682
 *         __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":2683
 *         __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx')
 *         __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent')
 *         __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback')             # <<<<<<<<<<<<<<
 *         __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback = dlsym(__pyx_v_handle, ((char const *)"cuStreamAddCallback"));

    /* "cuda/_cuda/ccuda.pyx":2684
 *         __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent')
 *         __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback')
 *         __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')             # <<<<<<<<<<<<<<
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')
 *         __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamBeginCapture_v2"));

    /* "cuda/_cuda/ccuda.pyx":2685
 *         __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback')
 *         __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')             # <<<<<<<<<<<<<<
 *         __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture')
 *         __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode = dlsym(__pyx_v_handle, ((char const *)"cuThreadExchangeStreamCaptureMode"));

    /* "cuda/_cuda/ccuda.pyx":2686
 *         __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2')
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')
 *         __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":2687
 *         __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode')
 *         __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":2688
 *         __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":2689
 *         __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":2690
 *         __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":2691
 *         __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":2692
 *         __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies')
 *         __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync')
 *         __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery')             # <<<<<<<<<<<<<<
 *         __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery = dlsym(__pyx_v_handle, ((char const *)"cuStreamQuery"));

    /* "cuda/_cuda/ccuda.pyx":2693
 *         __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync')
 *         __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery')
 *         __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')             # <<<<<<<<<<<<<<
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')
 *         __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuStreamSynchronize"));

    /* "cuda/_cuda/ccuda.pyx":2694
 *         __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery')
 *         __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')             # <<<<<<<<<<<<<<
 *         __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')
 *         __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamDestroy_v2"));

    /* "cuda/_cuda/ccuda.pyx":2695
 *         __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize')
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')
 *         __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":2696
 *         __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2')
 *         __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')
 *         __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')             # <<<<<<<<<<<<<<
 *         __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":2697
 *         __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes')
 *         __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')
 *         __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')             # <<<<<<<<<<<<<<
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')
 *         __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamSetAttribute"));

    /* "cuda/_cuda/ccuda.pyx":2698
 *         __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute')
 *         __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')             # <<<<<<<<<<<<<<
 *         __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')
 *         __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate = dlsym(__pyx_v_handle, ((char const *)"cuEventCreate"));

    /* "cuda/_cuda/ccuda.pyx":2699
 *         __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute')
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')
 *         __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')             # <<<<<<<<<<<<<<
 *         __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')
 *         __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord = dlsym(__pyx_v_handle, ((char const *)"cuEventRecord"));

    /* "cuda/_cuda/ccuda.pyx":2700
 *         __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate')
 *         __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')
 *         __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')             # <<<<<<<<<<<<<<
 *         __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery')
 *         __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuEventRecordWithFlags"));

    /* "cuda/_cuda/ccuda.pyx":2701
 *         __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord')
 *         __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')
 *         __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":2702
 *         __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags')
 *         __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":2703
 *         __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":2704
 *         __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":2705
 *         __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":2706
 *         __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":2707
 *         __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":2708
 *         __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer')
 *         __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 *         __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory')             # <<<<<<<<<<<<<<
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')
 *         __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory = dlsym(__pyx_v_handle, ((char const *)"cuDestroyExternalMemory"));

    /* "cuda/_cuda/ccuda.pyx":2709
 *         __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 *         __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory')
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')             # <<<<<<<<<<<<<<
 *         __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')
 *         __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore = dlsym(__pyx_v_handle, ((char const *)"cuImportExternalSemaphore"));

    /* "cuda/_cuda/ccuda.pyx":2710
 *         __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory')
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')
 *         __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')             # <<<<<<<<<<<<<<
 *         __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuSignalExternalSemaphoresAsync"));

    /* "cuda/_cuda/ccuda.pyx":2711
 *         __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore')
 *         __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')
 *         __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')             # <<<<<<<<<<<<<<
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')
 *         __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuWaitExternalSemaphoresAsync"));

    /* "cuda/_cuda/ccuda.pyx":2712
 *         __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync')
 *         __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')             # <<<<<<<<<<<<<<
 *         __cuStreamWaitValue32 = dlfcn.dlsym(handle, 'cuStreamWaitValue32')
 *         __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore = dlsym(__pyx_v_handle, ((char const *)"cuDestroyExternalSemaphore"));

    /* "cuda/_cuda/ccuda.pyx":2713
 *         __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync')
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')
 *         __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":2714
 *         __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore')
 *         __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":2715
 *         __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":2716
 *         __cuStreamWaitValue64 = dlfcn.dlsym(handle, 'cuStreamWaitValue64')
 *         __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32')
 *         __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64')             # <<<<<<<<<<<<<<
 *         __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')
 *         __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue64"));

    /* "cuda/_cuda/ccuda.pyx":2717
 *         __cuStreamWriteValue32 = dlfcn.dlsym(handle, 'cuStreamWriteValue32')
 *         __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64')
 *         __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')             # <<<<<<<<<<<<<<
 *         __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute')
 *         __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp = dlsym(__pyx_v_handle, ((char const *)"cuStreamBatchMemOp"));

    /* "cuda/_cuda/ccuda.pyx":2718
 *         __cuStreamWriteValue64 = dlfcn.dlsym(handle, 'cuStreamWriteValue64')
 *         __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')
 *         __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":2719
 *         __cuStreamBatchMemOp = dlfcn.dlsym(handle, 'cuStreamBatchMemOp')
 *         __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":2720
 *         __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":2721
 *         __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute')
 *         __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig')
 *         __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')
 *         __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetSharedMemConfig"));

    /* "cuda/_cuda/ccuda.pyx":2722
 *         __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig')
 *         __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig')
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')             # <<<<<<<<<<<<<<
 *         __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')
 *         __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule = dlsym(__pyx_v_handle, ((char const *)"cuFuncGetModule"));

    /* "cuda/_cuda/ccuda.pyx":2723
 *         __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig')
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')
 *         __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')             # <<<<<<<<<<<<<<
 *         __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchKernel"));

    /* "cuda/_cuda/ccuda.pyx":2724
 *         __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule')
 *         __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')
 *         __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')             # <<<<<<<<<<<<<<
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')
 *         __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchCooperativeKernel"));

    /* "cuda/_cuda/ccuda.pyx":2725
 *         __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel')
 *         __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')             # <<<<<<<<<<<<<<
 *         __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')
 *         __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice = dlsym(__pyx_v_handle, ((char const *)"cuLaunchCooperativeKernelMultiDevice"));

    /* "cuda/_cuda/ccuda.pyx":2726
 *         __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel')
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')
 *         __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')             # <<<<<<<<<<<<<<
 *         __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape')
 *         __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc = dlsym(__pyx_v_handle, ((char const *)"cuLaunchHostFunc"));

    /* "cuda/_cuda/ccuda.pyx":2727
 *         __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice')
 *         __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')
 *         __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":2728
 *         __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc')
 *         __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":2729
 *         __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":2730
 *         __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":2731
 *         __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":2732
 *         __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":2733
 *         __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":2734
 *         __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":2735
 *         __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":2736
 *         __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":2737
 *         __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":2738
 *         __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":2739
 *         __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":2740
 *         __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":2741
 *         __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":2742
 *         __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":2743
 *         __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":2744
 *         __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":2745
 *         __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":2746
 *         __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":2747
 *         __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":2748
 *         __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":2749
 *         __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":2750
 *         __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":2751
 *         __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":2752
 *         __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":2753
 *         __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":2754
 *         __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":2755
 *         __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":2756
 *         __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":2757
 *         __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":2758
 *         __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":2759
 *         __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":2760
 *         __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":2761
 *         __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":2762
 *         __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":2763
 *         __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":2764
 *         __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":2765
 *         __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":2766
 *         __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":2767
 *         __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":2768
 *         __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":2769
 *         __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":2770
 *         __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":2771
 *         __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":2772
 *         __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":2773
 *         __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":2774
 *         __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":2775
 *         __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":2776
 *         __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":2777
 *         __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":2778
 *         __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":2779
 *         __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":2780
 *         __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":2781
 *         __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":2782
 *         __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":2783
 *         __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":2784
 *         __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":2785
 *         __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":2786
 *         __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":2787
 *         __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":2788
 *         __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":2789
 *         __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":2790
 *         __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":2791
 *         __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":2792
 *         __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent')
 *         __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent')
 *         __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecExternalSemaphoresSignalNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":2793
 *         __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent')
 *         __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')             # <<<<<<<<<<<<<<
 *         __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')
 *         __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecExternalSemaphoresWaitNodeSetParams"));

    /* "cuda/_cuda/ccuda.pyx":2794
 *         __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')             # <<<<<<<<<<<<<<
 *         __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')
 *         __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload = dlsym(__pyx_v_handle, ((char const *)"cuGraphUpload"));

    /* "cuda/_cuda/ccuda.pyx":2795
 *         __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 *         __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')
 *         __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')             # <<<<<<<<<<<<<<
 *         __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy')
 *         __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch = dlsym(__pyx_v_handle, ((char const *)"cuGraphLaunch"));

    /* "cuda/_cuda/ccuda.pyx":2796
 *         __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload')
 *         __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')
 *         __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":2797
 *         __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch')
 *         __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":2798
 *         __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":2799
 *         __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":2800
 *         __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":2801
 *         __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":2802
 *         __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":2803
 *         __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":2804
 *         __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":2805
 *         __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":2806
 *         __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":2807
 *         __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":2808
 *         __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":2809
 *         __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":2810
 *         __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":2811
 *         __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":2812
 *         __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":2813
 *         __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":2814
 *         __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":2815
 *         __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":2816
 *         __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":2817
 *         __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":2818
 *         __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":2819
 *         __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":2820
 *         __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":2821
 *         __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":2822
 *         __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":2823
 *         __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":2824
 *         __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":2825
 *         __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":2826
 *         __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":2827
 *         __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":2828
 *         __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":2829
 *         __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":2830
 *         __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":2831
 *         __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":2832
 *         __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":2833
 *         __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":2834
 *         __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":2835
 *         __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":2836
 *         __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":2837
 *         __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":2838
 *         __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":2839
 *         __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":2840
 *         __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":2841
 *         __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":2842
 *         __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":2843
 *         __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":2844
 *         __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":2845
 *         __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":2846
 *         __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":2847
 *         __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":2848
 *         __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":2849
 *         __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":2850
 *         __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":2851
 *         __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":2852
 *         __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":2853
 *         __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":2854
 *         __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":2855
 *         __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":2856
 *         __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":2857
 *         __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray')
 *         __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 *         __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2')             # <<<<<<<<<<<<<<
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')
 *         __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceGetMappedPointer_v2"));

    /* "cuda/_cuda/ccuda.pyx":2858
 *         __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 *         __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')             # <<<<<<<<<<<<<<
 *         __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')
 *         __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceSetMapFlags_v2"));

    /* "cuda/_cuda/ccuda.pyx":2859
 *         __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')
 *         __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')             # <<<<<<<<<<<<<<
 *         __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsMapResources"));

    /* "cuda/_cuda/ccuda.pyx":2860
 *         __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2')
 *         __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')
 *         __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')             # <<<<<<<<<<<<<<
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsUnmapResources"));

    /* "cuda/_cuda/ccuda.pyx":2861
 *         __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources')
 *         __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')             # <<<<<<<<<<<<<<
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')
 * 
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress = dlsym(__pyx_v_handle, ((char const *)"cuGetProcAddress"));

    /* "cuda/_cuda/ccuda.pyx":2862
 *         __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources')
 *         __cuGetProcAddress = dlfcn.dlsym(handle, 'cuGetProcAddress')
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable = dlsym(__pyx_v_handle, ((char const *)"cuGetExportTable"));
  }

  /* "cuda/_cuda/ccuda.pyx":369
 * 
 * cdef int cuPythonInit() nogil except -1:
 *     global __cuPythonInit             # <<<<<<<<<<<<<<
 *     if __cuPythonInit:
 *         return 0
 */
  /*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":368
 * cdef void *__cuGetExportTable = NULL
 * 
 * cdef int cuPythonInit() nogil except -1:             # <<<<<<<<<<<<<<
 *     global __cuPythonInit
 *     if __cuPythonInit:
 */

  /* 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_6);
  __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":2864
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')
 * 
 * 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], 2864, 1, __PYX_ERR(0, 2864, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2865
 * 
 * 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":2866
 * 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, 2866, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2867
 *     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":2868
 *     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":2869
 *     if __cuGetErrorString == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2869, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2869, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2870
 *         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":2871
 *             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":2865
 * 
 * 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":2864
 *         __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable')
 * 
 * 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":2873
 *     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], 2873, 1, __PYX_ERR(0, 2873, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2874
 * 
 * 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":2875
 * 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, 2875, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2876
 *     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":2877
 *     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":2878
 *     if __cuGetErrorName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2878, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2878, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2879
 *         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":2880
 *             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":2874
 * 
 * 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":2873
 *     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":2882
 *     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], 2882, 1, __PYX_ERR(0, 2882, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":2884
 * 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, 2884, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2885
 *     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":2886
 *     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":2887
 *     if __cuInit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2887, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2887, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2888
 *         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":2889
 *             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":2883
 * 
 * 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":2882
 *     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":2891
 *     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], 2891, 1, __PYX_ERR(0, 2891, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":2893
 * 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, 2893, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2894
 *     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":2895
 *     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":2896
 *     if __cuDriverGetVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2896, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2896, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2897
 *         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":2898
 *             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":2892
 * 
 * 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":2891
 *     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":2900
 *     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], 2900, 1, __PYX_ERR(0, 2900, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":2902
 * 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, 2902, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2903
 *     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":2904
 *     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":2905
 *     if __cuDeviceGet == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2905, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2905, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2906
 *         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":2907
 *             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":2901
 * 
 * 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":2900
 *     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":2909
 *     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], 2909, 1, __PYX_ERR(0, 2909, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":2911
 * 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, 2911, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2912
 *     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":2913
 *     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":2914
 *     if __cuDeviceGetCount == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2914, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2914, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2915
 *         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":2916
 *             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":2910
 * 
 * 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":2909
 *     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":2918
 *     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], 2918, 1, __PYX_ERR(0, 2918, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2919
 * 
 * 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":2920
 * 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, 2920, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2921
 *     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":2922
 *     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":2923
 *     if __cuDeviceGetName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2923, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2923, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2924
 *         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":2925
 *             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":2919
 * 
 * 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":2918
 *     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":2927
 *     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], 2927, 1, __PYX_ERR(0, 2927, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":2929
 * 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, 2929, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2930
 *     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":2931
 *     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":2932
 *     if __cuDeviceGetUuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2932, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2932, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2933
 *         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":2934
 *             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":2928
 * 
 * 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":2927
 *     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":2936
 *     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], 2936, 1, __PYX_ERR(0, 2936, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2937
 * 
 * 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":2938
 * 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, 2938, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2939
 *     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":2940
 *     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":2941
 *     if __cuDeviceGetUuid_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2941, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2941, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2942
 *         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":2943
 *             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":2937
 * 
 * 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":2936
 *     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":2945
 *     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], 2945, 1, __PYX_ERR(0, 2945, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2946
 * 
 * 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":2947
 * 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, 2947, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2948
 *     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":2949
 *     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":2950
 *     if __cuDeviceGetLuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2950, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2950, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2951
 *         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":2952
 *             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":2946
 * 
 * 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":2945
 *     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":2954
 *     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], 2954, 1, __PYX_ERR(0, 2954, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2955
 * 
 * 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":2956
 * 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, 2956, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2957
 *     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":2958
 *     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":2959
 *     if __cuDeviceTotalMem_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2959, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2959, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2960
 *         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":2961
 *             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":2955
 * 
 * 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":2954
 *     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":2963
 *     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], 2963, 1, __PYX_ERR(0, 2963, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2964
 * 
 * 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":2965
 * 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, 2965, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2966
 *     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":2967
 *     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":2968
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUarray_format, unsigned, CUdevice) nogil> __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2968, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2968, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2969
 *         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":2970
 *             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":2964
 * 
 * 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":2963
 *     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":2972
 *     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], 2972, 1, __PYX_ERR(0, 2972, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2973
 * 
 * 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":2974
 * 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, 2974, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2975
 *     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":2976
 *     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":2977
 *     if __cuDeviceGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2977, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2977, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2978
 *         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":2979
 *             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":2973
 * 
 * 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":2972
 *     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":2981
 *     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], 2981, 1, __PYX_ERR(0, 2981, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":2982
 * 
 * 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":2983
 * 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, 2983, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2984
 *     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":2985
 *     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":2986
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2986, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2986, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2987
 *         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":2988
 *             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":2982
 * 
 * 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":2981
 *     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":2990
 *     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], 2990, 1, __PYX_ERR(0, 2990, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":2992
 * 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, 2992, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":2993
 *     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":2994
 *     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":2995
 *     if __cuDeviceSetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2995, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 2995, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":2996
 *         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":2997
 *             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":2991
 * 
 * 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":2990
 *     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":2999
 *     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], 2999, 1, __PYX_ERR(0, 2999, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3001
 * 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, 3001, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3002
 *     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":3003
 *     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":3004
 *     if __cuDeviceGetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3004, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3004, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3005
 *         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":3006
 *             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":3000
 * 
 * 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":2999
 *     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":3008
 *     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], 3008, 1, __PYX_ERR(0, 3008, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3009
 * 
 * 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":3010
 * 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, 3010, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3011
 *     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":3012
 *     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":3013
 *     if __cuDeviceGetDefaultMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3013, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3013, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3014
 *         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":3015
 *             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":3009
 * 
 * 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":3008
 *     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":3017
 *     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], 3017, 1, __PYX_ERR(0, 3017, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3019
 * 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, 3019, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3020
 *     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":3021
 *     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":3022
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3022, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3022, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3023
 *         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":3024
 *             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":3018
 * 
 * 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":3017
 *     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":3026
 *     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], 3026, 1, __PYX_ERR(0, 3026, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3028
 * 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, 3028, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3029
 *     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":3030
 *     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":3031
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3031, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3031, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3032
 *         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":3033
 *             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":3027
 * 
 * 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":3026
 *     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":3035
 *     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], 3035, 1, __PYX_ERR(0, 3035, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3036
 * 
 * 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":3037
 * 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, 3037, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3038
 *     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":3039
 *     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":3040
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3040, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3040, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3041
 *         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":3042
 *             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":3036
 * 
 * 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":3035
 *     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":3044
 *     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], 3044, 1, __PYX_ERR(0, 3044, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3046
 * 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, 3046, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3047
 *     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":3048
 *     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":3049
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3049, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3049, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3050
 *         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":3051
 *             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":3045
 * 
 * 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":3044
 *     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":3053
 *     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], 3053, 1, __PYX_ERR(0, 3053, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3054
 * 
 * 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":3055
 * 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, 3055, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3056
 *     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":3057
 *     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":3058
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3058, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3058, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3059
 *         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":3060
 *             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":3054
 * 
 * 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":3053
 *     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":3062
 *     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], 3062, 1, __PYX_ERR(0, 3062, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3063
 * 
 * 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":3064
 * 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, 3064, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3065
 *     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":3066
 *     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":3067
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3067, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3067, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3068
 *         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":3069
 *             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":3063
 * 
 * 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":3062
 *     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":3071
 *     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], 3071, 1, __PYX_ERR(0, 3071, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3072
 * 
 * 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":3073
 * 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, 3073, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3074
 *     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":3075
 *     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":3076
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3076, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3076, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3077
 *         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":3078
 *             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":3072
 * 
 * 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":3071
 *     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":3080
 *     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], 3080, 1, __PYX_ERR(0, 3080, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3081
 * 
 * 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":3082
 * 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, 3082, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3083
 *     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":3084
 *     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":3085
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3085, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3085, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3086
 *         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":3087
 *             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":3081
 * 
 * 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":3080
 *     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":3089
 *     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], 3089, 1, __PYX_ERR(0, 3089, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3090
 * 
 * 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":3091
 * 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, 3091, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3092
 *     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":3093
 *     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":3094
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3094, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3094, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3095
 *         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":3096
 *             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":3090
 * 
 * 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":3089
 *     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":3098
 *     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], 3098, 1, __PYX_ERR(0, 3098, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3099
 * 
 * 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":3100
 * 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, 3100, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3101
 *     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":3102
 *     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":3103
 *     if __cuCtxCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice) nogil> __cuCtxCreate_v2)(pctx, flags, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3103, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3103, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3104
 *         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":3105
 *             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":3099
 * 
 * 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":3098
 *     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":3107
 *     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], 3107, 1, __PYX_ERR(0, 3107, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3108
 * 
 * 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":3109
 * 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, 3109, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3110
 *     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":3111
 *     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":3112
 *     if __cuCtxCreate_v3 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUexecAffinityParam*, int, unsigned int, CUdevice) nogil> __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3112, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3112, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3113
 *         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":3114
 *             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":3108
 * 
 * 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":3107
 *     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":3116
 *     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], 3116, 1, __PYX_ERR(0, 3116, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3117
 * 
 * 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":3118
 * 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, 3118, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3119
 *     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":3120
 *     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":3121
 *     if __cuCtxDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3121, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3121, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3122
 *         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":3123
 *             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":3117
 * 
 * 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":3116
 *     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":3125
 *     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], 3125, 1, __PYX_ERR(0, 3125, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3126
 * 
 * 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":3127
 * 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, 3127, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3128
 *     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":3129
 *     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":3130
 *     if __cuCtxPushCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3130, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3130, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3131
 *         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":3132
 *             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":3126
 * 
 * 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":3125
 *     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":3134
 *     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], 3134, 1, __PYX_ERR(0, 3134, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3135
 * 
 * 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":3136
 * 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, 3136, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3137
 *     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":3138
 *     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":3139
 *     if __cuCtxPopCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3139, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3139, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3140
 *         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":3141
 *             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":3135
 * 
 * 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":3134
 *     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":3143
 *     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], 3143, 1, __PYX_ERR(0, 3143, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3145
 * 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, 3145, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3146
 *     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":3147
 *     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":3148
 *     if __cuCtxSetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3148, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3148, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3149
 *         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":3150
 *             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":3144
 * 
 * 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":3143
 *     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":3152
 *     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], 3152, 1, __PYX_ERR(0, 3152, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3154
 * 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, 3154, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3155
 *     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":3156
 *     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":3157
 *     if __cuCtxGetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3157, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3157, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3158
 *         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":3159
 *             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":3153
 * 
 * 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":3152
 *     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":3161
 *     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], 3161, 1, __PYX_ERR(0, 3161, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3163
 * 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, 3163, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3164
 *     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":3165
 *     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":3166
 *     if __cuCtxGetDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3166, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3166, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3167
 *         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":3168
 *             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":3162
 * 
 * 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":3161
 *     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":3170
 *     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], 3170, 1, __PYX_ERR(0, 3170, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3172
 * 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, 3172, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3173
 *     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":3174
 *     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":3175
 *     if __cuCtxGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3175, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3175, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3176
 *         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":3177
 *             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":3171
 * 
 * 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":3170
 *     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":3179
 *     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], 3179, 1, __PYX_ERR(0, 3179, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3181
 * 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, 3181, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3182
 *     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":3183
 *     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":3184
 *     if __cuCtxSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3184, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3184, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3185
 *         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":3186
 *             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":3180
 * 
 * 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":3179
 *     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":3188
 *     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], 3188, 1, __PYX_ERR(0, 3188, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3189
 * 
 * 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":3190
 * 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, 3190, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3191
 *     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":3192
 *     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":3193
 *     if __cuCtxSetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3193, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3193, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3194
 *         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":3195
 *             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":3189
 * 
 * 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":3188
 *     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":3197
 *     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], 3197, 1, __PYX_ERR(0, 3197, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3198
 * 
 * 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":3199
 * 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, 3199, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3200
 *     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":3201
 *     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":3202
 *     if __cuCtxGetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3202, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3202, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3203
 *         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":3204
 *             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":3198
 * 
 * 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":3197
 *     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":3206
 *     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], 3206, 1, __PYX_ERR(0, 3206, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3208
 * 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, 3208, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3209
 *     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":3210
 *     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":3211
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3211, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3211, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3212
 *         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":3213
 *             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":3207
 * 
 * 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":3206
 *     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":3215
 *     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], 3215, 1, __PYX_ERR(0, 3215, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3217
 * 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, 3217, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3218
 *     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":3219
 *     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":3220
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3220, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3220, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3221
 *         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":3222
 *             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":3216
 * 
 * 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":3215
 *     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":3224
 *     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], 3224, 1, __PYX_ERR(0, 3224, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3226
 * 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, 3226, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3227
 *     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":3228
 *     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":3229
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3229, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3229, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3230
 *         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":3231
 *             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":3225
 * 
 * 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":3224
 *     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":3233
 *     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], 3233, 1, __PYX_ERR(0, 3233, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3235
 * 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, 3235, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3236
 *     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":3237
 *     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":3238
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3238, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3238, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3239
 *         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":3240
 *             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":3234
 * 
 * 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":3233
 *     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":3242
 *     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], 3242, 1, __PYX_ERR(0, 3242, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3243
 * 
 * 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":3244
 * 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, 3244, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3245
 *     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":3246
 *     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":3247
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3247, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3247, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3248
 *         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":3249
 *             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":3243
 * 
 * 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":3242
 *     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":3251
 *     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], 3251, 1, __PYX_ERR(0, 3251, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3253
 * 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, 3253, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3254
 *     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":3255
 *     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":3256
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3256, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3256, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3257
 *         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":3258
 *             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":3252
 * 
 * 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":3251
 *     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":3260
 *     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], 3260, 1, __PYX_ERR(0, 3260, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3262
 * 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, 3262, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3263
 *     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":3264
 *     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":3265
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3265, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3265, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3266
 *         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":3267
 *             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":3261
 * 
 * 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":3260
 *     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":3269
 *     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], 3269, 1, __PYX_ERR(0, 3269, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3271
 * 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, 3271, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3272
 *     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":3273
 *     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":3274
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3274, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3274, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3275
 *         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":3276
 *             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":3270
 * 
 * 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":3269
 *     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":3278
 *     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], 3278, 1, __PYX_ERR(0, 3278, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3279
 * 
 * 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":3280
 * 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, 3280, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3281
 *     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":3282
 *     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":3283
 *     if __cuCtxAttach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3283, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3283, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3284
 *         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":3285
 *             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":3279
 * 
 * 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":3278
 *     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":3287
 *     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], 3287, 1, __PYX_ERR(0, 3287, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":3289
 * 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, 3289, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3290
 *     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":3291
 *     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":3292
 *     if __cuCtxDetach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3292, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3293
 *         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":3294
 *             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":3288
 * 
 * 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":3287
 *     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":3296
 *     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], 3296, 1, __PYX_ERR(0, 3296, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3297
 * 
 * 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":3298
 * 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, 3298, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3299
 *     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":3300
 *     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":3301
 *     if __cuModuleLoad == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3301, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3301, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3302
 *         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":3303
 *             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":3297
 * 
 * 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":3296
 *     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":3305
 *     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], 3305, 1, __PYX_ERR(0, 3305, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3306
 * 
 * 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":3307
 * 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, 3307, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3308
 *     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":3309
 *     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":3310
 *     if __cuModuleLoadData == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3310, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3310, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3311
 *         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":3312
 *             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":3306
 * 
 * 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":3305
 *     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":3314
 *     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], 3314, 1, __PYX_ERR(0, 3314, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3315
 * 
 * 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":3316
 * 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, 3316, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3317
 *     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":3318
 *     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":3319
 *     if __cuModuleLoadDataEx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*, unsigned int, CUjit_option*, void**) nogil> __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3319, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3319, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3320
 *         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":3321
 *             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":3315
 * 
 * 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":3314
 *     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":3323
 *     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], 3323, 1, __PYX_ERR(0, 3323, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3324
 * 
 * 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":3325
 * 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, 3325, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3326
 *     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":3327
 *     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":3328
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3328, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3328, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3329
 *         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":3330
 *             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":3324
 * 
 * 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":3323
 *     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":3332
 *     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], 3332, 1, __PYX_ERR(0, 3332, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3333
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleUnload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3334
 * 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, 3334, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3335
 *     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":3336
 *     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":3337
 *     if __cuModuleUnload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3337, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3337, __pyx_L8_error)
          }

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

    /* "cuda/_cuda/ccuda.pyx":3338
 *         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":3339
 *             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":3333
 * 
 * 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":3332
 *     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":3341
 *     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], 3341, 1, __PYX_ERR(0, 3341, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3342
 * 
 * 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":3343
 * 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, 3343, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3347
 *         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":3348
 *             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":3342
 * 
 * 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":3341
 *     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":3350
 *     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], 3350, 1, __PYX_ERR(0, 3350, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3351
 * 
 * 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":3352
 * 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, 3352, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3356
 *         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":3357
 *             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":3351
 * 
 * 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":3350
 *     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":3359
 *     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], 3359, 1, __PYX_ERR(0, 3359, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3360
 * 
 * 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":3361
 * 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, 3361, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3365
 *         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":3366
 *             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":3360
 * 
 * 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":3359
 *     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":3368
 *     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], 3368, 1, __PYX_ERR(0, 3368, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3369
 * 
 * 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":3370
 * 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, 3370, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3374
 *         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":3375
 *             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":3369
 * 
 * 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":3368
 *     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":3377
 *     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], 3377, 1, __PYX_ERR(0, 3377, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3378
 * 
 * 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":3379
 * 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, 3379, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3383
 *         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":3384
 *             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":3378
 * 
 * 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":3377
 *     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":3386
 *     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], 3386, 1, __PYX_ERR(0, 3386, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3387
 * 
 * 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":3388
 * 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, 3388, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3392
 *         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":3393
 *             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":3387
 * 
 * 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":3386
 *     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":3395
 *     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], 3395, 1, __PYX_ERR(0, 3395, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3396
 * 
 * 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":3397
 * 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, 3397, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3401
 *         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":3402
 *             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":3396
 * 
 * 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":3395
 *     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":3404
 *     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], 3404, 1, __PYX_ERR(0, 3404, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3405
 * 
 * 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":3406
 * 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, 3406, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3410
 *         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":3411
 *             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":3405
 * 
 * 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":3404
 *     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":3413
 *     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], 3413, 1, __PYX_ERR(0, 3413, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3414
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLinkDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3415
 * 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, 3415, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3419
 *         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":3420
 *             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":3414
 * 
 * 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":3413
 *     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":3422
 *     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], 3422, 1, __PYX_ERR(0, 3422, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3423
 * 
 * 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":3424
 * 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, 3424, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3428
 *         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":3429
 *             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":3423
 * 
 * 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":3422
 *     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":3431
 *     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], 3431, 1, __PYX_ERR(0, 3431, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3432
 * 
 * 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":3433
 * 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, 3433, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3437
 *         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":3438
 *             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":3432
 * 
 * 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":3431
 *     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":3440
 *     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], 3440, 1, __PYX_ERR(0, 3440, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3441
 * 
 * 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":3442
 * 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, 3442, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3446
 *         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":3447
 *             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":3441
 * 
 * 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":3440
 *     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":3449
 *     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], 3449, 1, __PYX_ERR(0, 3449, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3450
 * 
 * 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":3451
 * 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, 3451, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3455
 *         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":3456
 *             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":3450
 * 
 * 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":3449
 *     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":3458
 *     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], 3458, 1, __PYX_ERR(0, 3458, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3459
 * 
 * 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":3460
 * 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, 3460, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3464
 *         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":3465
 *             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":3459
 * 
 * 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":3458
 *     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":3467
 *     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], 3467, 1, __PYX_ERR(0, 3467, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3468
 * 
 * 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":3469
 * 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, 3469, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3473
 *         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":3474
 *             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":3468
 * 
 * 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":3467
 *     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":3476
 *     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], 3476, 1, __PYX_ERR(0, 3476, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3477
 * 
 * cdef CUresult _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemFreeHost             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3478
 * 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, 3478, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3482
 *         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":3483
 *             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":3477
 * 
 * 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":3476
 *     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":3485
 *     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], 3485, 1, __PYX_ERR(0, 3485, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3486
 * 
 * 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":3487
 * 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, 3487, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3491
 *         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":3492
 *             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":3486
 * 
 * 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":3485
 *     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":3494
 *     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], 3494, 1, __PYX_ERR(0, 3494, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3495
 * 
 * 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":3496
 * 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, 3496, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3500
 *         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":3501
 *             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":3495
 * 
 * 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":3494
 *     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":3503
 *     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], 3503, 1, __PYX_ERR(0, 3503, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3504
 * 
 * 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":3505
 * 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, 3505, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3509
 *         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":3510
 *             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":3504
 * 
 * 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":3503
 *     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":3512
 *     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], 3512, 1, __PYX_ERR(0, 3512, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3513
 * 
 * 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":3514
 * 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, 3514, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3518
 *         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":3519
 *             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":3513
 * 
 * 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":3512
 *     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":3521
 *     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], 3521, 1, __PYX_ERR(0, 3521, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3522
 * 
 * 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":3523
 * 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, 3523, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3527
 *         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":3528
 *             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":3522
 * 
 * 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":3521
 *     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":3530
 *     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], 3530, 1, __PYX_ERR(0, 3530, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3531
 * 
 * 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":3532
 * 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, 3532, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3536
 *         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":3537
 *             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":3531
 * 
 * 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":3530
 *     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":3539
 *     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], 3539, 1, __PYX_ERR(0, 3539, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3540
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcGetEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3541
 * 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, 3541, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3545
 *         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":3546
 *             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":3540
 * 
 * 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":3539
 *     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":3548
 *     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], 3548, 1, __PYX_ERR(0, 3548, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3549
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcOpenEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3550
 * 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, 3550, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3554
 *         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":3555
 *             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":3549
 * 
 * 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":3548
 *     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":3557
 *     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], 3557, 1, __PYX_ERR(0, 3557, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3558
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcGetMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3559
 * 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, 3559, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3563
 *         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":3564
 *             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":3558
 * 
 * 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":3557
 *     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":3566
 *     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], 3566, 1, __PYX_ERR(0, 3566, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3567
 * 
 * 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":3568
 * 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, 3568, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3572
 *         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":3573
 *             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":3567
 * 
 * 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":3566
 *     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":3575
 *     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], 3575, 1, __PYX_ERR(0, 3575, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3576
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcCloseMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3577
 * 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, 3577, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3581
 *         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":3582
 *             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":3576
 * 
 * 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":3575
 *     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":3584
 *     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], 3584, 1, __PYX_ERR(0, 3584, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3585
 * 
 * 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":3586
 * 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, 3586, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3590
 *         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":3591
 *             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":3585
 * 
 * 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":3584
 *     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":3593
 *     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], 3593, 1, __PYX_ERR(0, 3593, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3594
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemHostUnregister             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3595
 * 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, 3595, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3599
 *         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":3600
 *             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":3594
 * 
 * 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":3593
 *     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":3602
 *     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], 3602, 1, __PYX_ERR(0, 3602, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3603
 * 
 * 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":3604
 * 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, 3604, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3608
 *         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":3609
 *             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":3603
 * 
 * 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":3602
 *     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":3611
 *     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], 3611, 1, __PYX_ERR(0, 3611, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3612
 * 
 * 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":3613
 * 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, 3613, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3617
 *         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":3618
 *             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":3612
 * 
 * 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":3611
 *     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":3620
 *     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], 3620, 1, __PYX_ERR(0, 3620, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3621
 * 
 * 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":3622
 * 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, 3622, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3626
 *         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":3627
 *             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":3621
 * 
 * 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":3620
 *     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":3629
 *     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], 3629, 1, __PYX_ERR(0, 3629, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3630
 * 
 * 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":3631
 * 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, 3631, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3635
 *         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":3636
 *             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":3630
 * 
 * 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":3629
 *     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":3638
 *     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], 3638, 1, __PYX_ERR(0, 3638, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3639
 * 
 * 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":3640
 * 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, 3640, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3644
 *         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":3645
 *             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":3639
 * 
 * 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":3638
 *     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":3647
 *     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], 3647, 1, __PYX_ERR(0, 3647, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3648
 * 
 * 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":3649
 * 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, 3649, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3653
 *         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":3654
 *             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":3648
 * 
 * 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":3647
 *     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":3656
 *     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], 3656, 1, __PYX_ERR(0, 3656, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3657
 * 
 * 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":3658
 * 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, 3658, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3662
 *         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":3663
 *             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":3657
 * 
 * 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":3656
 *     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":3665
 *     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], 3665, 1, __PYX_ERR(0, 3665, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3666
 * 
 * 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":3667
 * 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, 3667, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3671
 *         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":3672
 *             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":3666
 * 
 * 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":3665
 *     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":3674
 *     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], 3674, 1, __PYX_ERR(0, 3674, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3675
 * 
 * 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":3676
 * 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, 3676, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3680
 *         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":3681
 *             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":3675
 * 
 * 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":3674
 *     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":3683
 *     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], 3683, 1, __PYX_ERR(0, 3683, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3684
 * 
 * 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":3685
 * 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, 3685, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3689
 *         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":3690
 *             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":3684
 * 
 * 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":3683
 *     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":3692
 *     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], 3692, 1, __PYX_ERR(0, 3692, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3693
 * 
 * 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":3694
 * 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, 3694, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3698
 *         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":3699
 *             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":3693
 * 
 * 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":3692
 *     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":3701
 *     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], 3701, 1, __PYX_ERR(0, 3701, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3702
 * 
 * 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":3703
 * 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, 3703, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3707
 *         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":3708
 *             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":3702
 * 
 * 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":3701
 *     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":3710
 *     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], 3710, 1, __PYX_ERR(0, 3710, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3711
 * 
 * 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":3712
 * 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, 3712, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3716
 *         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":3717
 *             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":3711
 * 
 * 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":3710
 *     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":3719
 *     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], 3719, 1, __PYX_ERR(0, 3719, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3720
 * 
 * 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":3721
 * 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, 3721, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3725
 *         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":3726
 *             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":3720
 * 
 * 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":3719
 *     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":3728
 *     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], 3728, 1, __PYX_ERR(0, 3728, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3729
 * 
 * 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":3730
 * 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, 3730, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3734
 *         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":3735
 *             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":3729
 * 
 * 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":3728
 *     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":3737
 *     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], 3737, 1, __PYX_ERR(0, 3737, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3738
 * 
 * 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":3739
 * 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, 3739, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3743
 *         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":3744
 *             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":3738
 * 
 * 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":3737
 *     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":3746
 *     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], 3746, 1, __PYX_ERR(0, 3746, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3747
 * 
 * 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":3748
 * 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, 3748, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3752
 *         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":3753
 *             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":3747
 * 
 * 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":3746
 *     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":3755
 *     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], 3755, 1, __PYX_ERR(0, 3755, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3756
 * 
 * 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":3757
 * 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, 3757, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3761
 *         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":3762
 *             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":3756
 * 
 * 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":3755
 *     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":3764
 *     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], 3764, 1, __PYX_ERR(0, 3764, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3765
 * 
 * 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":3766
 * 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, 3766, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3770
 *         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":3771
 *             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":3765
 * 
 * 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":3764
 *     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":3773
 *     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], 3773, 1, __PYX_ERR(0, 3773, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3774
 * 
 * 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":3775
 * 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, 3775, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3779
 *         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":3780
 *             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":3774
 * 
 * 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":3773
 *     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":3782
 *     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], 3782, 1, __PYX_ERR(0, 3782, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3783
 * 
 * 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":3784
 * 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, 3784, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3788
 *         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":3789
 *             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":3783
 * 
 * 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":3782
 *     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":3791
 *     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], 3791, 1, __PYX_ERR(0, 3791, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3792
 * 
 * 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":3793
 * 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, 3793, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3797
 *         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":3798
 *             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":3792
 * 
 * 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":3791
 *     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":3800
 *     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], 3800, 1, __PYX_ERR(0, 3800, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3801
 * 
 * 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":3802
 * 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, 3802, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3806
 *         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":3807
 *             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":3801
 * 
 * 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":3800
 *     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":3809
 *     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], 3809, 1, __PYX_ERR(0, 3809, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3810
 * 
 * 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":3811
 * 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, 3811, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3815
 *         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":3816
 *             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":3810
 * 
 * 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":3809
 *     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":3818
 *     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], 3818, 1, __PYX_ERR(0, 3818, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3819
 * 
 * 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":3820
 * 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, 3820, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3824
 *         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":3825
 *             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":3819
 * 
 * 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":3818
 *     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":3827
 *     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], 3827, 1, __PYX_ERR(0, 3827, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3828
 * 
 * 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":3829
 * 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, 3829, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3833
 *         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":3834
 *             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":3828
 * 
 * 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":3827
 *     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":3836
 *     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], 3836, 1, __PYX_ERR(0, 3836, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3837
 * 
 * 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":3838
 * 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, 3838, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3842
 *         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":3843
 *             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":3837
 * 
 * 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":3836
 *     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":3845
 *     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], 3845, 1, __PYX_ERR(0, 3845, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3846
 * 
 * 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":3847
 * 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, 3847, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3851
 *         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":3852
 *             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":3846
 * 
 * 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":3845
 *     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":3854
 *     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], 3854, 1, __PYX_ERR(0, 3854, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3855
 * 
 * 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":3856
 * 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, 3856, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3860
 *         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":3861
 *             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":3855
 * 
 * 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":3854
 *     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":3863
 *     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], 3863, 1, __PYX_ERR(0, 3863, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3864
 * 
 * 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":3865
 * 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, 3865, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3869
 *         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":3870
 *             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":3864
 * 
 * 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":3863
 *     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":3872
 *     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], 3872, 1, __PYX_ERR(0, 3872, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3873
 * 
 * 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":3874
 * 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, 3874, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3878
 *         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":3879
 *             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":3873
 * 
 * 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":3872
 *     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":3881
 *     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], 3881, 1, __PYX_ERR(0, 3881, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3882
 * 
 * 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":3883
 * 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, 3883, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3887
 *         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":3888
 *             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":3882
 * 
 * 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":3881
 *     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":3890
 *     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], 3890, 1, __PYX_ERR(0, 3890, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3891
 * 
 * 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":3892
 * 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, 3892, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3896
 *         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":3897
 *             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":3891
 * 
 * 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":3890
 *     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":3899
 *     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], 3899, 1, __PYX_ERR(0, 3899, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3900
 * 
 * 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":3901
 * 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, 3901, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3905
 *         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":3906
 *             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":3900
 * 
 * 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":3899
 *     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":3908
 *     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], 3908, 1, __PYX_ERR(0, 3908, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3909
 * 
 * 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":3910
 * 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, 3910, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3914
 *         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":3915
 *             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":3909
 * 
 * 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":3908
 *     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":3917
 *     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], 3917, 1, __PYX_ERR(0, 3917, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3918
 * 
 * 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":3919
 * 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, 3919, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3923
 *         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":3924
 *             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":3918
 * 
 * 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":3917
 *     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":3926
 *     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], 3926, 1, __PYX_ERR(0, 3926, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3927
 * 
 * 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":3928
 * 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, 3928, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3932
 *         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":3933
 *             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":3927
 * 
 * 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":3926
 *     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":3935
 *     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], 3935, 1, __PYX_ERR(0, 3935, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3936
 * 
 * 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":3937
 * 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, 3937, __pyx_L4_error)

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

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

    /* "cuda/_cuda/ccuda.pyx":3941
 *         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":3942
 *             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":3936
 * 
 * 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":3935
 *     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":3944
 *     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], 3944, 1, __PYX_ERR(0, 3944, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3945
 * 
 * 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":3946
 * 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, 3946, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":3948
 *     cuPythonInit()
 *     if __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":3947
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3950
 *         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":3951
 *             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":3945
 * 
 * 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":3944
 *     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":3953
 *     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], 3953, 1, __PYX_ERR(0, 3953, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3954
 * 
 * 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":3955
 * 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, 3955, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":3957
 *     cuPythonInit()
 *     if __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":3956
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3959
 *         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":3960
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUmipmappedArray) nogil> __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap)
 *     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":3954
 * 
 * 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":3953
 *     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":3962
 *     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], 3962, 1, __PYX_ERR(0, 3962, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3963
 * 
 * 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":3964
 * 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, 3964, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":3966
 *     cuPythonInit()
 *     if __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":3965
 *     global __cuArrayGetPlane
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3968
 *         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":3969
 *             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":3963
 * 
 * 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":3962
 *     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":3971
 *     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], 3971, 1, __PYX_ERR(0, 3971, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3972
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3973
 * 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, 3973, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":3975
 *     cuPythonInit()
 *     if __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":3974
 *     global __cuArrayDestroy
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3977
 *         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":3978
 *             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":3972
 * 
 * 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":3971
 *     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":3980
 *     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], 3980, 1, __PYX_ERR(0, 3980, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3981
 * 
 * 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":3982
 * 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, 3982, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":3984
 *     cuPythonInit()
 *     if __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":3983
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3986
 *         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":3987
 *             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":3981
 * 
 * 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":3980
 *     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":3989
 *     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], 3989, 1, __PYX_ERR(0, 3989, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3990
 * 
 * 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":3991
 * 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, 3991, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":3993
 *     cuPythonInit()
 *     if __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":3992
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3995
 *         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":3996
 *             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":3990
 * 
 * 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":3989
 *     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":3998
 *     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], 3998, 1, __PYX_ERR(0, 3998, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3999
 * 
 * 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":4000
 * 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, 4000, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4002
 *     cuPythonInit()
 *     if __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":4001
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4004
 *         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":4005
 *             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":3999
 * 
 * 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":3998
 *     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":4007
 *     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], 4007, 1, __PYX_ERR(0, 4007, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4008
 * 
 * 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":4009
 * 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, 4009, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4011
 *     cuPythonInit()
 *     if __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":4010
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4013
 *         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":4014
 *             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":4008
 * 
 * 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":4007
 *     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":4016
 *     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], 4016, 1, __PYX_ERR(0, 4016, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4017
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMipmappedArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4018
 * 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, 4018, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4020
 *     cuPythonInit()
 *     if __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":4019
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4022
 *         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":4023
 *             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":4017
 * 
 * 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":4016
 *     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":4025
 *     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], 4025, 1, __PYX_ERR(0, 4025, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4026
 * 
 * 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":4027
 * 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, 4027, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4029
 *     cuPythonInit()
 *     if __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":4028
 *     global __cuMemAddressReserve
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4031
 *         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":4032
 *             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":4026
 * 
 * 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":4025
 *     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":4034
 *     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], 4034, 1, __PYX_ERR(0, 4034, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4035
 * 
 * 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":4036
 * 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, 4036, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4038
 *     cuPythonInit()
 *     if __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":4037
 *     global __cuMemAddressFree
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4040
 *         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":4041
 *             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":4035
 * 
 * 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":4034
 *     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":4043
 *     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], 4043, 1, __PYX_ERR(0, 4043, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4044
 * 
 * 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":4045
 * 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, 4045, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4047
 *     cuPythonInit()
 *     if __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":4046
 *     global __cuMemCreate
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4049
 *         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":4050
 *             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":4044
 * 
 * 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":4043
 *     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":4052
 *     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], 4052, 1, __PYX_ERR(0, 4052, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4053
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemRelease             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4054
 * 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, 4054, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4056
 *     cuPythonInit()
 *     if __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":4055
 *     global __cuMemRelease
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4058
 *         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":4059
 *             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":4053
 * 
 * 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":4052
 *     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":4061
 *     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], 4061, 1, __PYX_ERR(0, 4061, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4062
 * 
 * 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":4063
 * 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, 4063, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4065
 *     cuPythonInit()
 *     if __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":4064
 *     global __cuMemMap
 *     cuPythonInit()
 *     if __cuMemMap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMap" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4067
 *         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":4068
 *             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":4062
 * 
 * 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":4061
 *     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":4070
 *     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], 4070, 1, __PYX_ERR(0, 4070, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4071
 * 
 * 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":4072
 * 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, 4072, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4074
 *     cuPythonInit()
 *     if __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":4073
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4076
 *         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":4077
 *             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":4071
 * 
 * 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":4070
 *     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":4079
 *     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], 4079, 1, __PYX_ERR(0, 4079, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4080
 * 
 * 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":4081
 * 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, 4081, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4083
 *     cuPythonInit()
 *     if __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":4082
 *     global __cuMemUnmap
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4085
 *         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":4086
 *             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":4080
 * 
 * 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":4079
 *     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":4088
 *     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], 4088, 1, __PYX_ERR(0, 4088, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4089
 * 
 * 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":4090
 * 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, 4090, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4092
 *     cuPythonInit()
 *     if __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":4091
 *     global __cuMemSetAccess
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4094
 *         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":4095
 *             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":4089
 * 
 * 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":4088
 *     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":4097
 *     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], 4097, 1, __PYX_ERR(0, 4097, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4098
 * 
 * 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":4099
 * 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, 4099, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4101
 *     cuPythonInit()
 *     if __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":4100
 *     global __cuMemGetAccess
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4103
 *         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":4104
 *             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":4098
 * 
 * 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":4097
 *     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":4106
 *     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], 4106, 1, __PYX_ERR(0, 4106, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4107
 * 
 * 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":4108
 * 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, 4108, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4110
 *     cuPythonInit()
 *     if __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":4109
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4112
 *         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":4113
 *             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":4107
 * 
 * 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":4106
 *     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":4115
 *     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], 4115, 1, __PYX_ERR(0, 4115, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4116
 * 
 * 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":4117
 * 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, 4117, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4119
 *     cuPythonInit()
 *     if __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":4118
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4121
 *         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":4122
 *             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":4116
 * 
 * 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":4115
 *     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":4124
 *     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], 4124, 1, __PYX_ERR(0, 4124, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4125
 * 
 * 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":4126
 * 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, 4126, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4128
 *     cuPythonInit()
 *     if __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":4127
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4130
 *         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":4131
 *             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":4125
 * 
 * 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":4124
 *     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":4133
 *     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], 4133, 1, __PYX_ERR(0, 4133, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4134
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemGetAllocationPropertiesFromHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4135
 * 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, 4135, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4137
 *     cuPythonInit()
 *     if __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":4136
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4139
 *         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":4140
 *             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":4134
 * 
 * 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":4133
 *     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":4142
 *     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], 4142, 1, __PYX_ERR(0, 4142, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4143
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemRetainAllocationHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4144
 * 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, 4144, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4146
 *     cuPythonInit()
 *     if __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":4145
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4148
 *         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":4149
 *             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":4143
 * 
 * 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":4142
 *     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":4151
 *     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], 4151, 1, __PYX_ERR(0, 4151, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4152
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemFreeAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4153
 * 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, 4153, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4155
 *     cuPythonInit()
 *     if __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":4154
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4157
 *         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":4158
 *             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":4152
 * 
 * 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":4151
 *     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":4160
 *     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], 4160, 1, __PYX_ERR(0, 4160, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4161
 * 
 * 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":4162
 * 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, 4162, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4164
 *     cuPythonInit()
 *     if __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":4163
 *     global __cuMemAllocAsync
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4166
 *         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":4167
 *             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":4161
 * 
 * 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":4160
 *     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":4169
 *     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], 4169, 1, __PYX_ERR(0, 4169, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4170
 * 
 * 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":4171
 * 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, 4171, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4173
 *     cuPythonInit()
 *     if __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":4172
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4175
 *         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":4176
 *             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":4170
 * 
 * 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":4169
 *     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":4178
 *     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], 4178, 1, __PYX_ERR(0, 4178, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4179
 * 
 * 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":4180
 * 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, 4180, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4182
 *     cuPythonInit()
 *     if __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":4181
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4184
 *         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":4185
 *             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":4179
 * 
 * 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":4178
 *     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":4187
 *     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], 4187, 1, __PYX_ERR(0, 4187, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4188
 * 
 * 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":4189
 * 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, 4189, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4191
 *     cuPythonInit()
 *     if __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":4190
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4193
 *         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":4194
 *             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":4188
 * 
 * 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":4187
 *     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":4196
 *     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], 4196, 1, __PYX_ERR(0, 4196, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4197
 * 
 * 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":4198
 * 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, 4198, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4200
 *     cuPythonInit()
 *     if __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":4199
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4202
 *         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":4203
 *             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":4197
 * 
 * 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":4196
 *     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":4205
 *     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], 4205, 1, __PYX_ERR(0, 4205, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4206
 * 
 * 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":4207
 * 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, 4207, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4209
 *     cuPythonInit()
 *     if __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":4208
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4211
 *         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":4212
 *             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":4206
 * 
 * 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":4205
 *     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":4214
 *     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], 4214, 1, __PYX_ERR(0, 4214, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4215
 * 
 * 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":4216
 * 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, 4216, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4218
 *     cuPythonInit()
 *     if __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":4217
 *     global __cuMemPoolCreate
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4220
 *         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":4221
 *             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":4215
 * 
 * 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":4214
 *     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":4223
 *     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], 4223, 1, __PYX_ERR(0, 4223, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4224
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4225
 * 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, 4225, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4227
 *     cuPythonInit()
 *     if __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":4226
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4229
 *         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":4230
 *             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":4224
 * 
 * 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":4223
 *     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":4232
 *     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], 4232, 1, __PYX_ERR(0, 4232, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4233
 * 
 * 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":4234
 * 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, 4234, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4236
 *     cuPythonInit()
 *     if __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":4235
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4238
 *         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":4239
 *             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":4233
 * 
 * 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":4232
 *     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":4241
 *     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], 4241, 1, __PYX_ERR(0, 4241, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4242
 * 
 * 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":4243
 * 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, 4243, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4245
 *     cuPythonInit()
 *     if __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":4244
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4247
 *         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":4248
 *             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":4242
 * 
 * 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":4241
 *     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":4250
 *     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], 4250, 1, __PYX_ERR(0, 4250, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4251
 * 
 * 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":4252
 * 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, 4252, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4254
 *     cuPythonInit()
 *     if __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":4253
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4256
 *         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":4257
 *             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":4251
 * 
 * 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":4250
 *     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":4259
 *     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], 4259, 1, __PYX_ERR(0, 4259, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4260
 * 
 * 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":4261
 * 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, 4261, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4263
 *     cuPythonInit()
 *     if __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":4262
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4265
 *         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":4266
 *             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":4260
 * 
 * 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":4259
 *     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":4268
 *     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], 4268, 1, __PYX_ERR(0, 4268, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4269
 * 
 * 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":4270
 * 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, 4270, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4272
 *     cuPythonInit()
 *     if __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":4271
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4274
 *         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":4275
 *             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":4269
 * 
 * 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":4268
 *     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":4277
 *     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], 4277, 1, __PYX_ERR(0, 4277, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4278
 * 
 * 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":4279
 * 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, 4279, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4281
 *     cuPythonInit()
 *     if __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":4280
 *     global __cuPointerGetAttribute
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4283
 *         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":4284
 *             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":4278
 * 
 * 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":4277
 *     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":4286
 *     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], 4286, 1, __PYX_ERR(0, 4286, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4287
 * 
 * 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":4288
 * 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, 4288, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4290
 *     cuPythonInit()
 *     if __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":4289
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4292
 *         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":4293
 *             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":4287
 * 
 * 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":4286
 *     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":4295
 *     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], 4295, 1, __PYX_ERR(0, 4295, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4296
 * 
 * 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":4297
 * 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, 4297, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4299
 *     cuPythonInit()
 *     if __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":4298
 *     global __cuMemAdvise
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4301
 *         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":4302
 *             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":4296
 * 
 * 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":4295
 *     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":4304
 *     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], 4304, 1, __PYX_ERR(0, 4304, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4305
 * 
 * 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":4306
 * 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, 4306, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4308
 *     cuPythonInit()
 *     if __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":4307
 *     global __cuMemRangeGetAttribute
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4310
 *         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":4311
 *             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":4305
 * 
 * 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":4304
 *     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":4313
 *     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], 4313, 1, __PYX_ERR(0, 4313, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4314
 * 
 * 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":4315
 * 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, 4315, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4317
 *     cuPythonInit()
 *     if __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":4316
 *     global __cuMemRangeGetAttributes
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4319
 *         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":4320
 *             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":4314
 * 
 * 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":4313
 *     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":4322
 *     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], 4322, 1, __PYX_ERR(0, 4322, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4323
 * 
 * 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":4324
 * 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, 4324, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4326
 *     cuPythonInit()
 *     if __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":4325
 *     global __cuPointerSetAttribute
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4328
 *         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":4329
 *             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":4323
 * 
 * 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":4322
 *     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":4331
 *     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], 4331, 1, __PYX_ERR(0, 4331, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4332
 * 
 * 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":4333
 * 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, 4333, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4335
 *     cuPythonInit()
 *     if __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":4334
 *     global __cuPointerGetAttributes
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4337
 *         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":4338
 *             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":4332
 * 
 * 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":4331
 *     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":4340
 *     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], 4340, 1, __PYX_ERR(0, 4340, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4341
 * 
 * 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":4342
 * 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, 4342, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4344
 *     cuPythonInit()
 *     if __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":4343
 *     global __cuStreamCreate
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4346
 *         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":4347
 *             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":4341
 * 
 * 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":4340
 *     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":4349
 *     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], 4349, 1, __PYX_ERR(0, 4349, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4350
 * 
 * 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":4351
 * 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, 4351, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4353
 *     cuPythonInit()
 *     if __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":4352
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4355
 *         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":4356
 *             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":4350
 * 
 * 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":4349
 *     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":4358
 *     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], 4358, 1, __PYX_ERR(0, 4358, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4359
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetPriority             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4360
 * 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, 4360, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4362
 *     cuPythonInit()
 *     if __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":4361
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4364
 *         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":4365
 *             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":4359
 * 
 * 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":4358
 *     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":4367
 *     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], 4367, 1, __PYX_ERR(0, 4367, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4368
 * 
 * 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":4369
 * 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, 4369, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4371
 *     cuPythonInit()
 *     if __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":4370
 *     global __cuStreamGetFlags
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4373
 *         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":4374
 *             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":4368
 * 
 * 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":4367
 *     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":4376
 *     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], 4376, 1, __PYX_ERR(0, 4376, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4377
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetCtx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4378
 * 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, 4378, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4380
 *     cuPythonInit()
 *     if __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":4379
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4382
 *         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":4383
 *             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":4377
 * 
 * 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":4376
 *     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":4385
 *     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], 4385, 1, __PYX_ERR(0, 4385, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4386
 * 
 * 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":4387
 * 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, 4387, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4389
 *     cuPythonInit()
 *     if __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":4388
 *     global __cuStreamWaitEvent
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4391
 *         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":4392
 *             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":4386
 * 
 * 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":4385
 *     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":4394
 *     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], 4394, 1, __PYX_ERR(0, 4394, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4395
 * 
 * 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":4396
 * 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, 4396, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4398
 *     cuPythonInit()
 *     if __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":4397
 *     global __cuStreamAddCallback
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4400
 *         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":4401
 *             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":4395
 * 
 * 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":4394
 *     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":4403
 *     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], 4403, 1, __PYX_ERR(0, 4403, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4404
 * 
 * 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":4405
 * 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, 4405, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4407
 *     cuPythonInit()
 *     if __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":4406
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4409
 *         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":4410
 *             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":4404
 * 
 * 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":4403
 *     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":4412
 *     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], 4412, 1, __PYX_ERR(0, 4412, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4413
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuThreadExchangeStreamCaptureMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4414
 * 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, 4414, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4416
 *     cuPythonInit()
 *     if __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":4415
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4418
 *         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":4419
 *             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":4413
 * 
 * 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":4412
 *     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":4421
 *     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], 4421, 1, __PYX_ERR(0, 4421, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4422
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamEndCapture             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4423
 * 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, 4423, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4425
 *     cuPythonInit()
 *     if __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":4424
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4427
 *         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":4428
 *             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":4422
 * 
 * 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":4421
 *     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":4430
 *     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], 4430, 1, __PYX_ERR(0, 4430, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4431
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamIsCapturing             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4432
 * 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, 4432, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4434
 *     cuPythonInit()
 *     if __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":4433
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4436
 *         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":4437
 *             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":4431
 * 
 * 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":4430
 *     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":4439
 *     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], 4439, 1, __PYX_ERR(0, 4439, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4440
 * 
 * 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":4441
 * 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, 4441, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4443
 *     cuPythonInit()
 *     if __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":4442
 *     global __cuStreamGetCaptureInfo
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4445
 *         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":4446
 *             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":4440
 * 
 * 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":4439
 *     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":4448
 *     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], 4448, 1, __PYX_ERR(0, 4448, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4449
 * 
 * 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":4450
 * 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, 4450, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4452
 *     cuPythonInit()
 *     if __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":4451
 *     global __cuStreamGetCaptureInfo_v2
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4454
 *         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":4455
 *             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":4449
 * 
 * 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":4448
 *     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":4457
 *     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], 4457, 1, __PYX_ERR(0, 4457, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4458
 * 
 * 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":4459
 * 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, 4459, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4461
 *     cuPythonInit()
 *     if __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":4460
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4463
 *         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":4464
 *             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":4458
 * 
 * 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":4457
 *     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":4466
 *     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], 4466, 1, __PYX_ERR(0, 4466, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4467
 * 
 * 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":4468
 * 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, 4468, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4470
 *     cuPythonInit()
 *     if __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":4469
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4472
 *         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":4473
 *             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":4467
 * 
 * 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":4466
 *     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":4475
 *     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], 4475, 1, __PYX_ERR(0, 4475, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4476
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4477
 * 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, 4477, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4479
 *     cuPythonInit()
 *     if __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":4478
 *     global __cuStreamQuery
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4481
 *         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":4482
 *             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":4476
 * 
 * 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":4475
 *     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":4484
 *     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], 4484, 1, __PYX_ERR(0, 4484, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4485
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4486
 * 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, 4486, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4488
 *     cuPythonInit()
 *     if __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":4487
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4490
 *         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":4491
 *             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":4485
 * 
 * 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":4484
 *     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":4493
 *     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], 4493, 1, __PYX_ERR(0, 4493, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4494
 * 
 * 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":4495
 * 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, 4495, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4497
 *     cuPythonInit()
 *     if __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":4496
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4499
 *         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":4500
 *             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":4494
 * 
 * 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":4493
 *     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":4502
 *     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], 4502, 1, __PYX_ERR(0, 4502, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4503
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4504
 * 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, 4504, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4506
 *     cuPythonInit()
 *     if __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":4505
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4508
 *         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":4509
 *             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":4503
 * 
 * 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":4502
 *     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":4511
 *     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], 4511, 1, __PYX_ERR(0, 4511, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4512
 * 
 * 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":4513
 * 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, 4513, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4515
 *     cuPythonInit()
 *     if __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":4514
 *     global __cuStreamGetAttribute
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4517
 *         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":4518
 *             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":4512
 * 
 * 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":4511
 *     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":4520
 *     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], 4520, 1, __PYX_ERR(0, 4520, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4521
 * 
 * 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":4522
 * 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, 4522, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4524
 *     cuPythonInit()
 *     if __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":4523
 *     global __cuStreamSetAttribute
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4526
 *         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":4527
 *             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":4521
 * 
 * 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":4520
 *     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":4529
 *     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], 4529, 1, __PYX_ERR(0, 4529, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4530
 * 
 * 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":4531
 * 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, 4531, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4533
 *     cuPythonInit()
 *     if __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":4532
 *     global __cuEventCreate
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4535
 *         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":4536
 *             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":4530
 * 
 * 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":4529
 *     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":4538
 *     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], 4538, 1, __PYX_ERR(0, 4538, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4539
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventRecord             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4540
 * 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, 4540, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4542
 *     cuPythonInit()
 *     if __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":4541
 *     global __cuEventRecord
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4544
 *         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":4545
 *             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":4539
 * 
 * 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":4538
 *     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":4547
 *     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], 4547, 1, __PYX_ERR(0, 4547, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4548
 * 
 * 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":4549
 * 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, 4549, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4551
 *     cuPythonInit()
 *     if __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":4550
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4553
 *         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":4554
 *             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":4548
 * 
 * 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":4547
 *     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":4556
 *     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], 4556, 1, __PYX_ERR(0, 4556, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4557
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4558
 * 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, 4558, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4560
 *     cuPythonInit()
 *     if __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":4559
 *     global __cuEventQuery
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4562
 *         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":4563
 *             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":4557
 * 
 * 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":4556
 *     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":4565
 *     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], 4565, 1, __PYX_ERR(0, 4565, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4566
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4567
 * 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, 4567, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4569
 *     cuPythonInit()
 *     if __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":4568
 *     global __cuEventSynchronize
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4571
 *         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":4572
 *             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":4566
 * 
 * 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":4565
 *     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":4574
 *     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], 4574, 1, __PYX_ERR(0, 4574, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4575
 * 
 * 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":4576
 * 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, 4576, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4578
 *     cuPythonInit()
 *     if __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":4577
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4580
 *         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":4581
 *             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":4575
 * 
 * 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":4574
 *     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":4583
 *     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], 4583, 1, __PYX_ERR(0, 4583, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4584
 * 
 * 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":4585
 * 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, 4585, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4587
 *     cuPythonInit()
 *     if __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":4586
 *     global __cuEventElapsedTime
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4589
 *         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":4590
 *             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":4584
 * 
 * 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":4583
 *     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":4592
 *     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], 4592, 1, __PYX_ERR(0, 4592, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4593
 * 
 * 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":4594
 * 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, 4594, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4596
 *     cuPythonInit()
 *     if __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":4595
 *     global __cuImportExternalMemory
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4598
 *         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":4599
 *             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":4593
 * 
 * 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":4592
 *     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":4601
 *     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], 4601, 1, __PYX_ERR(0, 4601, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4602
 * 
 * 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":4603
 * 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, 4603, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4605
 *     cuPythonInit()
 *     if __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":4604
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4607
 *         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":4608
 *             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":4602
 * 
 * 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":4601
 *     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":4610
 *     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], 4610, 1, __PYX_ERR(0, 4610, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4611
 * 
 * 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":4612
 * 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, 4612, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4614
 *     cuPythonInit()
 *     if __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":4613
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4616
 *         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":4617
 *             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":4611
 * 
 * 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":4610
 *     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":4619
 *     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], 4619, 1, __PYX_ERR(0, 4619, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4620
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDestroyExternalMemory             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4621
 * 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, 4621, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4623
 *     cuPythonInit()
 *     if __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":4622
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4625
 *         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":4626
 *             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":4620
 * 
 * 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":4619
 *     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":4628
 *     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], 4628, 1, __PYX_ERR(0, 4628, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4629
 * 
 * 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":4630
 * 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, 4630, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4632
 *     cuPythonInit()
 *     if __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":4631
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4634
 *         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":4635
 *             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":4629
 * 
 * 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":4628
 *     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":4637
 *     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], 4637, 1, __PYX_ERR(0, 4637, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4638
 * 
 * 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":4639
 * 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, 4639, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4641
 *     cuPythonInit()
 *     if __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":4640
 *     global __cuSignalExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4643
 *         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":4644
 *             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":4638
 * 
 * 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":4637
 *     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":4646
 *     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], 4646, 1, __PYX_ERR(0, 4646, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4647
 * 
 * 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":4648
 * 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, 4648, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4650
 *     cuPythonInit()
 *     if __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":4649
 *     global __cuWaitExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4652
 *         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":4653
 *             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":4647
 * 
 * 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":4646
 *     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":4655
 *     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], 4655, 1, __PYX_ERR(0, 4655, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4656
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDestroyExternalSemaphore             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4657
 * 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, 4657, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4659
 *     cuPythonInit()
 *     if __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":4658
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4661
 *         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":4662
 *             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":4656
 * 
 * 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":4655
 *     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":4664
 *     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], 4664, 1, __PYX_ERR(0, 4664, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4665
 * 
 * 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":4666
 * 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, 4666, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4668
 *     cuPythonInit()
 *     if __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":4667
 *     global __cuStreamWaitValue32
 *     cuPythonInit()
 *     if __cuStreamWaitValue32 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4670
 *         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":4671
 *             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":4665
 * 
 * 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":4664
 *     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":4673
 *     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], 4673, 1, __PYX_ERR(0, 4673, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4674
 * 
 * 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":4675
 * 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, 4675, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4677
 *     cuPythonInit()
 *     if __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":4676
 *     global __cuStreamWaitValue64
 *     cuPythonInit()
 *     if __cuStreamWaitValue64 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4679
 *         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":4680
 *             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":4674
 * 
 * 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":4673
 *     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":4682
 *     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], 4682, 1, __PYX_ERR(0, 4682, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4683
 * 
 * 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":4684
 * 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, 4684, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4686
 *     cuPythonInit()
 *     if __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":4685
 *     global __cuStreamWriteValue32
 *     cuPythonInit()
 *     if __cuStreamWriteValue32 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4688
 *         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":4689
 *             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":4683
 * 
 * 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":4682
 *     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":4691
 *     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], 4691, 1, __PYX_ERR(0, 4691, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4692
 * 
 * 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":4693
 * 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, 4693, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4695
 *     cuPythonInit()
 *     if __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":4694
 *     global __cuStreamWriteValue64
 *     cuPythonInit()
 *     if __cuStreamWriteValue64 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4697
 *         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":4698
 *             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":4692
 * 
 * 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":4691
 *     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":4700
 *     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], 4700, 1, __PYX_ERR(0, 4700, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4701
 * 
 * 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":4702
 * 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, 4702, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4704
 *     cuPythonInit()
 *     if __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":4703
 *     global __cuStreamBatchMemOp
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4706
 *         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":4707
 *             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":4701
 * 
 * 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":4700
 *     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":4709
 *     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], 4709, 1, __PYX_ERR(0, 4709, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4710
 * 
 * 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":4711
 * 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, 4711, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4713
 *     cuPythonInit()
 *     if __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":4712
 *     global __cuFuncGetAttribute
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4715
 *         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":4716
 *             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":4710
 * 
 * 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":4709
 *     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":4718
 *     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], 4718, 1, __PYX_ERR(0, 4718, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4719
 * 
 * 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":4720
 * 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, 4720, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4722
 *     cuPythonInit()
 *     if __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":4721
 *     global __cuFuncSetAttribute
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4724
 *         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":4725
 *             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":4719
 * 
 * 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":4718
 *     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":4727
 *     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], 4727, 1, __PYX_ERR(0, 4727, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4728
 * 
 * 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":4729
 * 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, 4729, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4731
 *     cuPythonInit()
 *     if __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":4730
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4733
 *         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":4734
 *             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":4728
 * 
 * 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":4727
 *     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":4736
 *     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], 4736, 1, __PYX_ERR(0, 4736, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4737
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncSetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4738
 * 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, 4738, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4740
 *     cuPythonInit()
 *     if __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":4739
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4742
 *         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":4743
 *             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":4737
 * 
 * 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":4736
 *     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":4745
 *     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], 4745, 1, __PYX_ERR(0, 4745, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4746
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncGetModule             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4747
 * 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, 4747, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4749
 *     cuPythonInit()
 *     if __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":4748
 *     global __cuFuncGetModule
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4751
 *         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":4752
 *             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":4746
 * 
 * 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":4745
 *     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":4754
 *     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], 4754, 1, __PYX_ERR(0, 4754, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4755
 * 
 * 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":4756
 * 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, 4756, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4758
 *     cuPythonInit()
 *     if __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":4757
 *     global __cuLaunchKernel
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4760
 *         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":4761
 *             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":4755
 * 
 * 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":4754
 *     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":4763
 *     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], 4763, 1, __PYX_ERR(0, 4763, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4764
 * 
 * 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":4765
 * 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, 4765, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4767
 *     cuPythonInit()
 *     if __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":4766
 *     global __cuLaunchCooperativeKernel
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4769
 *         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":4770
 *             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":4764
 * 
 * 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":4763
 *     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":4772
 *     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], 4772, 1, __PYX_ERR(0, 4772, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4773
 * 
 * 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":4774
 * 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, 4774, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4776
 *     cuPythonInit()
 *     if __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":4775
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4778
 *         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":4779
 *             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":4773
 * 
 * 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":4772
 *     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":4781
 *     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], 4781, 1, __PYX_ERR(0, 4781, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4782
 * 
 * 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":4783
 * 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, 4783, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4785
 *     cuPythonInit()
 *     if __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":4784
 *     global __cuLaunchHostFunc
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4787
 *         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":4788
 *             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":4782
 * 
 * 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":4781
 *     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":4790
 *     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], 4790, 1, __PYX_ERR(0, 4790, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4791
 * 
 * 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":4792
 * 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, 4792, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4794
 *     cuPythonInit()
 *     if __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":4793
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4796
 *         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":4797
 *             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":4791
 * 
 * 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":4790
 *     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":4799
 *     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], 4799, 1, __PYX_ERR(0, 4799, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4800
 * 
 * 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":4801
 * 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, 4801, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4803
 *     cuPythonInit()
 *     if __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":4802
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4805
 *         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":4806
 *             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":4800
 * 
 * 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":4799
 *     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":4808
 *     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], 4808, 1, __PYX_ERR(0, 4808, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4809
 * 
 * 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":4810
 * 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, 4810, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4812
 *     cuPythonInit()
 *     if __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":4811
 *     global __cuParamSetSize
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4814
 *         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":4815
 *             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":4809
 * 
 * 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":4808
 *     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":4817
 *     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], 4817, 1, __PYX_ERR(0, 4817, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4818
 * 
 * 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":4819
 * 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, 4819, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4821
 *     cuPythonInit()
 *     if __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":4820
 *     global __cuParamSeti
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4823
 *         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":4824
 *             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":4818
 * 
 * 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":4817
 *     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":4826
 *     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], 4826, 1, __PYX_ERR(0, 4826, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4827
 * 
 * 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":4828
 * 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, 4828, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4830
 *     cuPythonInit()
 *     if __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":4829
 *     global __cuParamSetf
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4832
 *         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":4833
 *             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":4827
 * 
 * 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":4826
 *     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":4835
 *     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], 4835, 1, __PYX_ERR(0, 4835, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4836
 * 
 * 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":4837
 * 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, 4837, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4839
 *     cuPythonInit()
 *     if __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":4838
 *     global __cuParamSetv
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetv" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4841
 *         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":4842
 *             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":4836
 * 
 * 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":4835
 *     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":4844
 *     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], 4844, 1, __PYX_ERR(0, 4844, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4845
 * 
 * cdef CUresult _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunch == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4846
 * 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, 4846, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4848
 *     cuPythonInit()
 *     if __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":4847
 *     global __cuLaunch
 *     cuPythonInit()
 *     if __cuLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4850
 *         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":4851
 *             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":4845
 * 
 * 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":4844
 *     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":4853
 *     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], 4853, 1, __PYX_ERR(0, 4853, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4854
 * 
 * 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":4855
 * 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, 4855, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4857
 *     cuPythonInit()
 *     if __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":4856
 *     global __cuLaunchGrid
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4859
 *         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":4860
 *             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":4854
 * 
 * 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":4853
 *     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":4862
 *     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], 4862, 1, __PYX_ERR(0, 4862, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4863
 * 
 * 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":4864
 * 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, 4864, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4866
 *     cuPythonInit()
 *     if __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":4865
 *     global __cuLaunchGridAsync
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4868
 *         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":4869
 *             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":4863
 * 
 * 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":4862
 *     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":4871
 *     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], 4871, 1, __PYX_ERR(0, 4871, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4872
 * 
 * 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":4873
 * 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, 4873, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4875
 *     cuPythonInit()
 *     if __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":4874
 *     global __cuParamSetTexRef
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4877
 *         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":4878
 *             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":4872
 * 
 * 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":4871
 *     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":4880
 *     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], 4880, 1, __PYX_ERR(0, 4880, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4881
 * 
 * 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":4882
 * 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, 4882, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4884
 *     cuPythonInit()
 *     if __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":4883
 *     global __cuGraphCreate
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4886
 *         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":4887
 *             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":4881
 * 
 * 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":4880
 *     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":4889
 *     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], 4889, 1, __PYX_ERR(0, 4889, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4890
 * 
 * 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":4891
 * 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, 4891, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4893
 *     cuPythonInit()
 *     if __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":4892
 *     global __cuGraphAddKernelNode
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4895
 *         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":4896
 *             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":4890
 * 
 * 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":4889
 *     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":4898
 *     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], 4898, 1, __PYX_ERR(0, 4898, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4899
 * 
 * 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":4900
 * 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, 4900, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4902
 *     cuPythonInit()
 *     if __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":4901
 *     global __cuGraphKernelNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4904
 *         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":4905
 *             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":4899
 * 
 * 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":4898
 *     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":4907
 *     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], 4907, 1, __PYX_ERR(0, 4907, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4908
 * 
 * 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":4909
 * 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, 4909, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4911
 *     cuPythonInit()
 *     if __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":4910
 *     global __cuGraphKernelNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4913
 *         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":4914
 *             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":4908
 * 
 * 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":4907
 *     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":4916
 *     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], 4916, 1, __PYX_ERR(0, 4916, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4917
 * 
 * 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":4918
 * 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, 4918, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4920
 *     cuPythonInit()
 *     if __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":4919
 *     global __cuGraphAddMemcpyNode
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4922
 *         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":4923
 *             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":4917
 * 
 * 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":4916
 *     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":4925
 *     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], 4925, 1, __PYX_ERR(0, 4925, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4926
 * 
 * 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":4927
 * 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, 4927, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4929
 *     cuPythonInit()
 *     if __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":4928
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4931
 *         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":4932
 *             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":4926
 * 
 * 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":4925
 *     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":4934
 *     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], 4934, 1, __PYX_ERR(0, 4934, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4935
 * 
 * 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":4936
 * 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, 4936, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4938
 *     cuPythonInit()
 *     if __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":4937
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4940
 *         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":4941
 *             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":4935
 * 
 * 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":4934
 *     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":4943
 *     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], 4943, 1, __PYX_ERR(0, 4943, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4944
 * 
 * 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":4945
 * 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, 4945, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4947
 *     cuPythonInit()
 *     if __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":4946
 *     global __cuGraphAddMemsetNode
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4949
 *         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":4950
 *             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":4944
 * 
 * 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":4943
 *     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":4952
 *     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], 4952, 1, __PYX_ERR(0, 4952, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4953
 * 
 * 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":4954
 * 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, 4954, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4956
 *     cuPythonInit()
 *     if __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":4955
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4958
 *         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":4959
 *             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":4953
 * 
 * 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":4952
 *     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":4961
 *     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], 4961, 1, __PYX_ERR(0, 4961, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4962
 * 
 * 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":4963
 * 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, 4963, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4965
 *     cuPythonInit()
 *     if __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":4964
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4967
 *         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":4968
 *             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":4962
 * 
 * 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":4961
 *     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":4970
 *     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], 4970, 1, __PYX_ERR(0, 4970, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4971
 * 
 * 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":4972
 * 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, 4972, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4974
 *     cuPythonInit()
 *     if __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":4973
 *     global __cuGraphAddHostNode
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4976
 *         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":4977
 *             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":4971
 * 
 * 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":4970
 *     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":4979
 *     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], 4979, 1, __PYX_ERR(0, 4979, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4980
 * 
 * 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":4981
 * 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, 4981, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4983
 *     cuPythonInit()
 *     if __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":4982
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4985
 *         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":4986
 *             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":4980
 * 
 * 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":4979
 *     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":4988
 *     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], 4988, 1, __PYX_ERR(0, 4988, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4989
 * 
 * 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":4990
 * 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, 4990, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":4992
 *     cuPythonInit()
 *     if __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":4991
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4994
 *         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":4995
 *             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":4989
 * 
 * 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":4988
 *     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":4997
 *     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], 4997, 1, __PYX_ERR(0, 4997, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4998
 * 
 * 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":4999
 * 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, 4999, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5001
 *     cuPythonInit()
 *     if __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":5000
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5003
 *         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":5004
 *             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":4998
 * 
 * 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":4997
 *     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":5006
 *     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], 5006, 1, __PYX_ERR(0, 5006, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5007
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphChildGraphNodeGetGraph             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5008
 * 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, 5008, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5010
 *     cuPythonInit()
 *     if __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":5009
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5012
 *         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":5013
 *             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":5007
 * 
 * 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":5006
 *     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":5015
 *     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], 5015, 1, __PYX_ERR(0, 5015, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5016
 * 
 * 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":5017
 * 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, 5017, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5019
 *     cuPythonInit()
 *     if __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":5018
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5021
 *         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":5022
 *             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":5016
 * 
 * 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":5015
 *     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":5024
 *     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], 5024, 1, __PYX_ERR(0, 5024, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5025
 * 
 * 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":5026
 * 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, 5026, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5028
 *     cuPythonInit()
 *     if __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":5027
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5030
 *         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":5031
 *             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":5025
 * 
 * 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":5024
 *     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":5033
 *     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], 5033, 1, __PYX_ERR(0, 5033, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5034
 * 
 * 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":5035
 * 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, 5035, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5037
 *     cuPythonInit()
 *     if __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":5036
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5039
 *         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":5040
 *             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":5034
 * 
 * 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":5033
 *     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":5042
 *     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], 5042, 1, __PYX_ERR(0, 5042, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5043
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphEventRecordNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5044
 * 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, 5044, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5046
 *     cuPythonInit()
 *     if __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":5045
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5048
 *         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":5049
 *             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":5043
 * 
 * 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":5042
 *     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":5051
 *     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], 5051, 1, __PYX_ERR(0, 5051, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5052
 * 
 * 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":5053
 * 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, 5053, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5055
 *     cuPythonInit()
 *     if __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":5054
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5057
 *         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":5058
 *             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":5052
 * 
 * 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":5051
 *     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":5060
 *     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], 5060, 1, __PYX_ERR(0, 5060, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5061
 * 
 * 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":5062
 * 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, 5062, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5064
 *     cuPythonInit()
 *     if __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":5063
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5066
 *         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":5067
 *             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":5061
 * 
 * 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":5060
 *     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":5069
 *     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], 5069, 1, __PYX_ERR(0, 5069, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5070
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphEventWaitNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5071
 * 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, 5071, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5073
 *     cuPythonInit()
 *     if __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":5072
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5075
 *         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":5076
 *             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":5070
 * 
 * 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":5069
 *     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":5078
 *     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], 5078, 1, __PYX_ERR(0, 5078, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5079
 * 
 * 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":5080
 * 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, 5080, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5082
 *     cuPythonInit()
 *     if __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":5081
 *     global __cuGraphAddExternalSemaphoresSignalNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5084
 *         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":5085
 *             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":5079
 * 
 * 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":5078
 *     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":5087
 *     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], 5087, 1, __PYX_ERR(0, 5087, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5088
 * 
 * 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":5089
 * 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, 5089, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5091
 *     cuPythonInit()
 *     if __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":5090
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5093
 *         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":5094
 *             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":5088
 * 
 * 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":5087
 *     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":5096
 *     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], 5096, 1, __PYX_ERR(0, 5096, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5097
 * 
 * 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":5098
 * 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, 5098, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5100
 *     cuPythonInit()
 *     if __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":5099
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5102
 *         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":5103
 *             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":5097
 * 
 * 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":5096
 *     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":5105
 *     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], 5105, 1, __PYX_ERR(0, 5105, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5106
 * 
 * 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":5107
 * 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, 5107, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5109
 *     cuPythonInit()
 *     if __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":5108
 *     global __cuGraphAddExternalSemaphoresWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5111
 *         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":5112
 *             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":5106
 * 
 * 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":5105
 *     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":5114
 *     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], 5114, 1, __PYX_ERR(0, 5114, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5115
 * 
 * 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":5116
 * 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, 5116, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5118
 *     cuPythonInit()
 *     if __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":5117
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5120
 *         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":5121
 *             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":5115
 * 
 * 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":5114
 *     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":5123
 *     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], 5123, 1, __PYX_ERR(0, 5123, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5124
 * 
 * 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":5125
 * 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, 5125, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5127
 *     cuPythonInit()
 *     if __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":5126
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5129
 *         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":5130
 *             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":5124
 * 
 * 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":5123
 *     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":5132
 *     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], 5132, 1, __PYX_ERR(0, 5132, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5133
 * 
 * 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":5134
 * 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, 5134, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5136
 *     cuPythonInit()
 *     if __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":5135
 *     global __cuGraphAddMemAllocNode
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5138
 *         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":5139
 *             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":5133
 * 
 * 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":5132
 *     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":5141
 *     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], 5141, 1, __PYX_ERR(0, 5141, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5142
 * 
 * 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":5143
 * 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, 5143, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5145
 *     cuPythonInit()
 *     if __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":5144
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5147
 *         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":5148
 *             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":5142
 * 
 * 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":5141
 *     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":5150
 *     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], 5150, 1, __PYX_ERR(0, 5150, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5151
 * 
 * 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":5152
 * 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, 5152, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5154
 *     cuPythonInit()
 *     if __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":5153
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5156
 *         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":5157
 *             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":5151
 * 
 * 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":5150
 *     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":5159
 *     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], 5159, 1, __PYX_ERR(0, 5159, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5160
 * 
 * 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":5161
 * 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, 5161, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5163
 *     cuPythonInit()
 *     if __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":5162
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5165
 *         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":5166
 *             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":5160
 * 
 * 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":5159
 *     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":5168
 *     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], 5168, 1, __PYX_ERR(0, 5168, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":5170
 * 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, 5170, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5172
 *     cuPythonInit()
 *     if __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":5171
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5174
 *         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":5175
 *             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":5169
 * 
 * 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":5168
 *     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":5177
 *     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], 5177, 1, __PYX_ERR(0, 5177, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5178
 * 
 * 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":5179
 * 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, 5179, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5181
 *     cuPythonInit()
 *     if __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":5180
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5183
 *         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":5184
 *             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":5178
 * 
 * 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":5177
 *     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":5186
 *     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], 5186, 1, __PYX_ERR(0, 5186, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5187
 * 
 * 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":5188
 * 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, 5188, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5190
 *     cuPythonInit()
 *     if __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":5189
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5192
 *         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":5193
 *             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":5187
 * 
 * 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":5186
 *     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":5195
 *     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], 5195, 1, __PYX_ERR(0, 5195, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5196
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphClone             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5197
 * 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, 5197, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5199
 *     cuPythonInit()
 *     if __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":5198
 *     global __cuGraphClone
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5201
 *         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":5202
 *             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":5196
 * 
 * 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":5195
 *     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":5204
 *     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], 5204, 1, __PYX_ERR(0, 5204, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5205
 * 
 * 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":5206
 * 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, 5206, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5208
 *     cuPythonInit()
 *     if __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":5207
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5210
 *         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":5211
 *             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":5205
 * 
 * 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":5204
 *     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":5213
 *     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], 5213, 1, __PYX_ERR(0, 5213, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5214
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphNodeGetType             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5215
 * 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, 5215, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5217
 *     cuPythonInit()
 *     if __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":5216
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5219
 *         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":5220
 *             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":5214
 * 
 * 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":5213
 *     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":5222
 *     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], 5222, 1, __PYX_ERR(0, 5222, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5223
 * 
 * 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":5224
 * 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, 5224, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5226
 *     cuPythonInit()
 *     if __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":5225
 *     global __cuGraphGetNodes
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5228
 *         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":5229
 *             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":5223
 * 
 * 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":5222
 *     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":5231
 *     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], 5231, 1, __PYX_ERR(0, 5231, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5232
 * 
 * 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":5233
 * 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, 5233, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5235
 *     cuPythonInit()
 *     if __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":5234
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5237
 *         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":5238
 *             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":5232
 * 
 * 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":5231
 *     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":5240
 *     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], 5240, 1, __PYX_ERR(0, 5240, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5241
 * 
 * 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":5242
 * 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, 5242, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5244
 *     cuPythonInit()
 *     if __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":5243
 *     global __cuGraphGetEdges
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5246
 *         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":5247
 *             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":5241
 * 
 * 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":5240
 *     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":5249
 *     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], 5249, 1, __PYX_ERR(0, 5249, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5250
 * 
 * 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":5251
 * 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, 5251, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5253
 *     cuPythonInit()
 *     if __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":5252
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5255
 *         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":5256
 *             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":5250
 * 
 * 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":5249
 *     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":5258
 *     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], 5258, 1, __PYX_ERR(0, 5258, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5259
 * 
 * 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":5260
 * 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, 5260, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5262
 *     cuPythonInit()
 *     if __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":5261
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5264
 *         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":5265
 *             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":5259
 * 
 * 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":5258
 *     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":5267
 *     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], 5267, 1, __PYX_ERR(0, 5267, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5268
 * 
 * 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":5269
 * 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, 5269, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5271
 *     cuPythonInit()
 *     if __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":5270
 *     global __cuGraphAddDependencies
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5273
 *         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":5274
 *             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":5268
 * 
 * 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":5267
 *     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":5276
 *     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], 5276, 1, __PYX_ERR(0, 5276, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5277
 * 
 * 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":5278
 * 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, 5278, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5280
 *     cuPythonInit()
 *     if __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":5279
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5282
 *         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":5283
 *             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":5277
 * 
 * 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":5276
 *     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":5285
 *     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], 5285, 1, __PYX_ERR(0, 5285, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5286
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphDestroyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5287
 * 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, 5287, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5289
 *     cuPythonInit()
 *     if __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":5288
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5291
 *         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":5292
 *             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":5286
 * 
 * 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":5285
 *     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":5294
 *     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], 5294, 1, __PYX_ERR(0, 5294, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5295
 * 
 * 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":5296
 * 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, 5296, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5298
 *     cuPythonInit()
 *     if __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":5297
 *     global __cuGraphInstantiate_v2
 *     cuPythonInit()
 *     if __cuGraphInstantiate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5300
 *         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":5301
 *             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":5295
 * 
 * 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":5294
 *     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":5303
 *     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], 5303, 1, __PYX_ERR(0, 5303, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5304
 * 
 * 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":5305
 * 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, 5305, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5307
 *     cuPythonInit()
 *     if __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":5306
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5309
 *         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":5310
 *             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":5304
 * 
 * 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":5303
 *     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":5312
 *     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], 5312, 1, __PYX_ERR(0, 5312, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5313
 * 
 * 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":5314
 * 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, 5314, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5316
 *     cuPythonInit()
 *     if __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":5315
 *     global __cuGraphExecKernelNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5318
 *         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":5319
 *             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":5313
 * 
 * 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":5312
 *     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":5321
 *     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], 5321, 1, __PYX_ERR(0, 5321, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5322
 * 
 * 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":5323
 * 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, 5323, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5325
 *     cuPythonInit()
 *     if __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":5324
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5327
 *         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":5328
 *             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":5322
 * 
 * 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":5321
 *     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":5330
 *     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], 5330, 1, __PYX_ERR(0, 5330, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5331
 * 
 * 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":5332
 * 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, 5332, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5334
 *     cuPythonInit()
 *     if __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":5333
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5336
 *         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":5337
 *             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":5331
 * 
 * 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":5330
 *     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":5339
 *     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], 5339, 1, __PYX_ERR(0, 5339, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5340
 * 
 * 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":5341
 * 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, 5341, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5343
 *     cuPythonInit()
 *     if __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":5342
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5345
 *         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":5346
 *             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":5340
 * 
 * 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":5339
 *     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":5348
 *     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], 5348, 1, __PYX_ERR(0, 5348, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5349
 * 
 * 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":5350
 * 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, 5350, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5352
 *     cuPythonInit()
 *     if __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":5351
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5354
 *         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":5355
 *             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":5349
 * 
 * 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":5348
 *     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":5357
 *     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], 5357, 1, __PYX_ERR(0, 5357, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5358
 * 
 * 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":5359
 * 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, 5359, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5361
 *     cuPythonInit()
 *     if __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":5360
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5363
 *         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":5364
 *             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":5358
 * 
 * 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":5357
 *     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":5366
 *     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], 5366, 1, __PYX_ERR(0, 5366, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5367
 * 
 * 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":5368
 * 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, 5368, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5370
 *     cuPythonInit()
 *     if __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":5369
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5372
 *         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":5373
 *             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":5367
 * 
 * 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":5366
 *     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":5375
 *     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], 5375, 1, __PYX_ERR(0, 5375, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5376
 * 
 * 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":5377
 * 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, 5377, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5379
 *     cuPythonInit()
 *     if __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":5378
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5381
 *         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":5382
 *             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":5376
 * 
 * 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":5375
 *     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":5384
 *     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], 5384, 1, __PYX_ERR(0, 5384, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5385
 * 
 * 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":5386
 * 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, 5386, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5388
 *     cuPythonInit()
 *     if __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":5387
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5390
 *         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":5391
 *             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 _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5385
 * 
 * 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":5384
 *     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":5393
 *     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], 5393, 1, __PYX_ERR(0, 5393, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5394
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphUpload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5395
 * 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, 5395, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5397
 *     cuPythonInit()
 *     if __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":5396
 *     global __cuGraphUpload
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5399
 *         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":5400
 *             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":5394
 * 
 * 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":5393
 *     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":5402
 *     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], 5402, 1, __PYX_ERR(0, 5402, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5403
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5404
 * 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, 5404, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5406
 *     cuPythonInit()
 *     if __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":5405
 *     global __cuGraphLaunch
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5408
 *         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":5409
 *             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":5403
 * 
 * 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":5402
 *     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":5411
 *     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], 5411, 1, __PYX_ERR(0, 5411, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5412
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5413
 * 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, 5413, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5415
 *     cuPythonInit()
 *     if __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":5414
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5417
 *         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":5418
 *             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":5412
 * 
 * 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":5411
 *     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":5420
 *     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], 5420, 1, __PYX_ERR(0, 5420, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5421
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5422
 * 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, 5422, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5424
 *     cuPythonInit()
 *     if __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":5423
 *     global __cuGraphDestroy
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5426
 *         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":5427
 *             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":5421
 * 
 * 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":5420
 *     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":5429
 *     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], 5429, 1, __PYX_ERR(0, 5429, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5430
 * 
 * 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":5431
 * 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, 5431, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5433
 *     cuPythonInit()
 *     if __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":5432
 *     global __cuGraphExecUpdate
 *     cuPythonInit()
 *     if __cuGraphExecUpdate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5435
 *         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":5436
 *             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":5430
 * 
 * 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":5429
 *     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":5438
 *     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], 5438, 1, __PYX_ERR(0, 5438, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5439
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5440
 * 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, 5440, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5442
 *     cuPythonInit()
 *     if __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":5441
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5444
 *         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":5445
 *             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":5439
 * 
 * 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":5438
 *     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":5447
 *     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], 5447, 1, __PYX_ERR(0, 5447, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5448
 * 
 * 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":5449
 * 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, 5449, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5451
 *     cuPythonInit()
 *     if __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":5450
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5453
 *         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":5454
 *             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":5448
 * 
 * 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":5447
 *     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":5456
 *     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], 5456, 1, __PYX_ERR(0, 5456, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5457
 * 
 * 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":5458
 * 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, 5458, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5460
 *     cuPythonInit()
 *     if __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":5459
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5462
 *         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":5463
 *             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":5457
 * 
 * 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":5456
 *     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":5465
 *     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], 5465, 1, __PYX_ERR(0, 5465, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5466
 * 
 * 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":5467
 * 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, 5467, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5469
 *     cuPythonInit()
 *     if __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":5468
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5471
 *         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":5472
 *             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":5466
 * 
 * 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":5465
 *     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":5474
 *     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], 5474, 1, __PYX_ERR(0, 5474, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5475
 * 
 * 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":5476
 * 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, 5476, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5478
 *     cuPythonInit()
 *     if __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":5477
 *     global __cuUserObjectCreate
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5480
 *         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":5481
 *             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":5475
 * 
 * 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":5474
 *     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":5483
 *     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], 5483, 1, __PYX_ERR(0, 5483, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5484
 * 
 * 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":5485
 * 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, 5485, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5487
 *     cuPythonInit()
 *     if __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":5486
 *     global __cuUserObjectRetain
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5489
 *         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":5490
 *             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":5484
 * 
 * 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":5483
 *     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":5492
 *     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], 5492, 1, __PYX_ERR(0, 5492, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5493
 * 
 * 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":5494
 * 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, 5494, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5496
 *     cuPythonInit()
 *     if __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":5495
 *     global __cuUserObjectRelease
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5498
 *         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":5499
 *             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":5493
 * 
 * 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":5492
 *     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":5501
 *     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], 5501, 1, __PYX_ERR(0, 5501, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5502
 * 
 * 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":5503
 * 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, 5503, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5505
 *     cuPythonInit()
 *     if __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":5504
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5507
 *         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":5508
 *             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":5502
 * 
 * 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":5501
 *     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":5510
 *     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], 5510, 1, __PYX_ERR(0, 5510, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5511
 * 
 * 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":5512
 * 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, 5512, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5514
 *     cuPythonInit()
 *     if __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":5513
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5516
 *         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":5517
 *             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":5511
 * 
 * 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":5510
 *     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":5519
 *     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], 5519, 1, __PYX_ERR(0, 5519, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5520
 * 
 * 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":5521
 * 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, 5521, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5523
 *     cuPythonInit()
 *     if __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":5522
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5525
 *         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":5526
 *             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":5520
 * 
 * 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":5519
 *     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":5528
 *     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], 5528, 1, __PYX_ERR(0, 5528, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5529
 * 
 * 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":5530
 * 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, 5530, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5532
 *     cuPythonInit()
 *     if __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":5531
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5534
 *         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":5535
 *             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":5529
 * 
 * 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":5528
 *     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":5537
 *     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], 5537, 1, __PYX_ERR(0, 5537, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5538
 * 
 * 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":5539
 * 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, 5539, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5541
 *     cuPythonInit()
 *     if __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":5540
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5543
 *         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":5544
 *             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":5538
 * 
 * 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":5537
 *     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":5546
 *     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], 5546, 1, __PYX_ERR(0, 5546, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5547
 * 
 * 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":5548
 * 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, 5548, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5550
 *     cuPythonInit()
 *     if __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":5549
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5552
 *         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":5553
 *             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":5547
 * 
 * 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":5546
 *     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":5555
 *     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], 5555, 1, __PYX_ERR(0, 5555, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5556
 * 
 * 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":5557
 * 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, 5557, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5559
 *     cuPythonInit()
 *     if __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":5558
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5561
 *         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":5562
 *             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":5556
 * 
 * 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":5555
 *     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":5564
 *     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], 5564, 1, __PYX_ERR(0, 5564, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5565
 * 
 * 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":5566
 * 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, 5566, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5568
 *     cuPythonInit()
 *     if __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":5567
 *     global __cuTexRefSetArray
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5570
 *         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":5571
 *             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":5565
 * 
 * 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":5564
 *     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":5573
 *     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], 5573, 1, __PYX_ERR(0, 5573, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5574
 * 
 * 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":5575
 * 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, 5575, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5577
 *     cuPythonInit()
 *     if __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":5576
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5579
 *         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":5580
 *             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":5574
 * 
 * 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":5573
 *     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":5582
 *     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], 5582, 1, __PYX_ERR(0, 5582, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5583
 * 
 * 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":5584
 * 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, 5584, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5586
 *     cuPythonInit()
 *     if __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":5585
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5588
 *         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":5589
 *             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":5583
 * 
 * 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":5582
 *     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":5591
 *     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], 5591, 1, __PYX_ERR(0, 5591, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5592
 * 
 * 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":5593
 * 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, 5593, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5595
 *     cuPythonInit()
 *     if __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":5594
 *     global __cuTexRefSetAddress2D_v3
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5597
 *         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":5598
 *             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":5592
 * 
 * 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":5591
 *     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":5600
 *     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], 5600, 1, __PYX_ERR(0, 5600, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5601
 * 
 * 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":5602
 * 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, 5602, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5604
 *     cuPythonInit()
 *     if __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":5603
 *     global __cuTexRefSetFormat
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5606
 *         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":5607
 *             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":5601
 * 
 * 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":5600
 *     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":5609
 *     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], 5609, 1, __PYX_ERR(0, 5609, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5610
 * 
 * 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":5611
 * 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, 5611, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5613
 *     cuPythonInit()
 *     if __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":5612
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5615
 *         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":5616
 *             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":5610
 * 
 * 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":5609
 *     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":5618
 *     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], 5618, 1, __PYX_ERR(0, 5618, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5619
 * 
 * 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":5620
 * 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, 5620, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5622
 *     cuPythonInit()
 *     if __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":5621
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5624
 *         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":5625
 *             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":5619
 * 
 * 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":5618
 *     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":5627
 *     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], 5627, 1, __PYX_ERR(0, 5627, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5628
 * 
 * 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":5629
 * 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, 5629, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5631
 *     cuPythonInit()
 *     if __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":5630
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5633
 *         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":5634
 *             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":5628
 * 
 * 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":5627
 *     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":5636
 *     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], 5636, 1, __PYX_ERR(0, 5636, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5637
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5638
 * 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, 5638, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5640
 *     cuPythonInit()
 *     if __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":5639
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5642
 *         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":5643
 *             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":5637
 * 
 * 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":5636
 *     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":5645
 *     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], 5645, 1, __PYX_ERR(0, 5645, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5646
 * 
 * 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":5647
 * 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, 5647, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5649
 *     cuPythonInit()
 *     if __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":5648
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5651
 *         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":5652
 *             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":5646
 * 
 * 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":5645
 *     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":5654
 *     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], 5654, 1, __PYX_ERR(0, 5654, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5655
 * 
 * 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":5656
 * 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, 5656, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5658
 *     cuPythonInit()
 *     if __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":5657
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5660
 *         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":5661
 *             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":5655
 * 
 * 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":5654
 *     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":5663
 *     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], 5663, 1, __PYX_ERR(0, 5663, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5664
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5665
 * 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, 5665, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5667
 *     cuPythonInit()
 *     if __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":5666
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5669
 *         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":5670
 *             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":5664
 * 
 * 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":5663
 *     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":5672
 *     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], 5672, 1, __PYX_ERR(0, 5672, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5673
 * 
 * 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":5674
 * 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, 5674, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5676
 *     cuPythonInit()
 *     if __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":5675
 *     global __cuTexRefSetFlags
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5678
 *         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":5679
 *             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":5673
 * 
 * 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":5672
 *     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":5681
 *     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], 5681, 1, __PYX_ERR(0, 5681, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5682
 * 
 * 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":5683
 * 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, 5683, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5685
 *     cuPythonInit()
 *     if __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":5684
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5687
 *         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":5688
 *             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":5682
 * 
 * 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":5681
 *     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":5690
 *     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], 5690, 1, __PYX_ERR(0, 5690, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5691
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5692
 * 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, 5692, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5694
 *     cuPythonInit()
 *     if __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":5693
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5696
 *         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":5697
 *             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":5691
 * 
 * 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":5690
 *     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":5699
 *     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], 5699, 1, __PYX_ERR(0, 5699, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5700
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5701
 * 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, 5701, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5703
 *     cuPythonInit()
 *     if __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":5702
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5705
 *         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":5706
 *             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":5700
 * 
 * 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":5699
 *     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":5708
 *     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], 5708, 1, __PYX_ERR(0, 5708, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5709
 * 
 * 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":5710
 * 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, 5710, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5712
 *     cuPythonInit()
 *     if __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":5711
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5714
 *         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":5715
 *             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":5709
 * 
 * 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":5708
 *     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":5717
 *     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], 5717, 1, __PYX_ERR(0, 5717, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5718
 * 
 * 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":5719
 * 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, 5719, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5721
 *     cuPythonInit()
 *     if __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":5720
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5723
 *         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":5724
 *             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":5718
 * 
 * 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":5717
 *     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":5726
 *     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], 5726, 1, __PYX_ERR(0, 5726, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5727
 * 
 * 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":5728
 * 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, 5728, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5730
 *     cuPythonInit()
 *     if __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":5729
 *     global __cuTexRefGetFormat
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5732
 *         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":5733
 *             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":5727
 * 
 * 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":5726
 *     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":5735
 *     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], 5735, 1, __PYX_ERR(0, 5735, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5736
 * 
 * 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":5737
 * 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, 5737, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5739
 *     cuPythonInit()
 *     if __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":5738
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5741
 *         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":5742
 *             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":5736
 * 
 * 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":5735
 *     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":5744
 *     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], 5744, 1, __PYX_ERR(0, 5744, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5745
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5746
 * 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, 5746, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5748
 *     cuPythonInit()
 *     if __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":5747
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5750
 *         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":5751
 *             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":5745
 * 
 * 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":5744
 *     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":5753
 *     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], 5753, 1, __PYX_ERR(0, 5753, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5754
 * 
 * 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":5755
 * 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, 5755, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5757
 *     cuPythonInit()
 *     if __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":5756
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5759
 *         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":5760
 *             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":5754
 * 
 * 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":5753
 *     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":5762
 *     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], 5762, 1, __PYX_ERR(0, 5762, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5763
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMaxAnisotropy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5764
 * 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, 5764, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5766
 *     cuPythonInit()
 *     if __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":5765
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5768
 *         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":5769
 *             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":5763
 * 
 * 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":5762
 *     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":5771
 *     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], 5771, 1, __PYX_ERR(0, 5771, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5772
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5773
 * 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, 5773, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5775
 *     cuPythonInit()
 *     if __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":5774
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5777
 *         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":5778
 *             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":5772
 * 
 * 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":5771
 *     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":5780
 *     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], 5780, 1, __PYX_ERR(0, 5780, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5781
 * 
 * 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":5782
 * 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, 5782, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5784
 *     cuPythonInit()
 *     if __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":5783
 *     global __cuTexRefGetFlags
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5786
 *         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":5787
 *             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":5781
 * 
 * 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":5780
 *     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":5789
 *     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], 5789, 1, __PYX_ERR(0, 5789, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5790
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5791
 * 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, 5791, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5793
 *     cuPythonInit()
 *     if __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":5792
 *     global __cuTexRefCreate
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5795
 *         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":5796
 *             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":5790
 * 
 * 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":5789
 *     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":5798
 *     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], 5798, 1, __PYX_ERR(0, 5798, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5799
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5800
 * 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, 5800, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5802
 *     cuPythonInit()
 *     if __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":5801
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5804
 *         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":5805
 *             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":5799
 * 
 * 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":5798
 *     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":5807
 *     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], 5807, 1, __PYX_ERR(0, 5807, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5808
 * 
 * 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":5809
 * 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, 5809, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5811
 *     cuPythonInit()
 *     if __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":5810
 *     global __cuSurfRefSetArray
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5813
 *         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":5814
 *             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":5808
 * 
 * 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":5807
 *     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":5816
 *     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], 5816, 1, __PYX_ERR(0, 5816, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5817
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5818
 * 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, 5818, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5820
 *     cuPythonInit()
 *     if __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":5819
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5822
 *         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":5823
 *             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":5817
 * 
 * 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":5816
 *     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":5825
 *     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], 5825, 1, __PYX_ERR(0, 5825, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5826
 * 
 * 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":5827
 * 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, 5827, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5829
 *     cuPythonInit()
 *     if __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":5828
 *     global __cuTexObjectCreate
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5831
 *         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":5832
 *             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":5826
 * 
 * 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":5825
 *     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":5834
 *     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], 5834, 1, __PYX_ERR(0, 5834, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5835
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5836
 * 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, 5836, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5838
 *     cuPythonInit()
 *     if __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":5837
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5840
 *         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":5841
 *             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":5835
 * 
 * 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":5834
 *     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":5843
 *     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], 5843, 1, __PYX_ERR(0, 5843, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5844
 * 
 * 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":5845
 * 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, 5845, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5847
 *     cuPythonInit()
 *     if __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":5846
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5849
 *         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":5850
 *             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":5844
 * 
 * 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":5843
 *     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":5852
 *     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], 5852, 1, __PYX_ERR(0, 5852, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5853
 * 
 * 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":5854
 * 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, 5854, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5856
 *     cuPythonInit()
 *     if __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":5855
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5858
 *         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":5859
 *             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":5853
 * 
 * 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":5852
 *     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":5861
 *     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], 5861, 1, __PYX_ERR(0, 5861, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5862
 * 
 * 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":5863
 * 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, 5863, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5865
 *     cuPythonInit()
 *     if __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":5864
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5867
 *         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":5868
 *             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":5862
 * 
 * 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":5861
 *     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":5870
 *     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], 5870, 1, __PYX_ERR(0, 5870, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5871
 * 
 * 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":5872
 * 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, 5872, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5874
 *     cuPythonInit()
 *     if __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":5873
 *     global __cuSurfObjectCreate
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5876
 *         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":5877
 *             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":5871
 * 
 * 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":5870
 *     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":5879
 *     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], 5879, 1, __PYX_ERR(0, 5879, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5880
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5881
 * 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, 5881, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5883
 *     cuPythonInit()
 *     if __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":5882
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5885
 *         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":5886
 *             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":5880
 * 
 * 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":5879
 *     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":5888
 *     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], 5888, 1, __PYX_ERR(0, 5888, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5889
 * 
 * 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":5890
 * 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, 5890, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5892
 *     cuPythonInit()
 *     if __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":5891
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5894
 *         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":5895
 *             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":5889
 * 
 * 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":5888
 *     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":5897
 *     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], 5897, 1, __PYX_ERR(0, 5897, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5898
 * 
 * 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":5899
 * 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, 5899, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5901
 *     cuPythonInit()
 *     if __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":5900
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5903
 *         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":5904
 *             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":5898
 * 
 * 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":5897
 *     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":5906
 *     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], 5906, 1, __PYX_ERR(0, 5906, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5907
 * 
 * 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":5908
 * 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, 5908, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5910
 *     cuPythonInit()
 *     if __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":5909
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5912
 *         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":5913
 *             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":5907
 * 
 * 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":5906
 *     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":5915
 *     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], 5915, 1, __PYX_ERR(0, 5915, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5916
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxDisablePeerAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5917
 * 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, 5917, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5919
 *     cuPythonInit()
 *     if __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":5918
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5921
 *         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":5922
 *             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":5916
 * 
 * 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":5915
 *     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":5924
 *     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], 5924, 1, __PYX_ERR(0, 5924, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5925
 * 
 * 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":5926
 * 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, 5926, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5928
 *     cuPythonInit()
 *     if __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":5927
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5930
 *         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":5931
 *             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":5925
 * 
 * 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":5924
 *     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":5933
 *     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], 5933, 1, __PYX_ERR(0, 5933, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5934
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsUnregisterResource             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5935
 * 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, 5935, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5937
 *     cuPythonInit()
 *     if __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":5936
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5939
 *         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":5940
 *             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":5934
 * 
 * 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":5933
 *     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":5942
 *     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], 5942, 1, __PYX_ERR(0, 5942, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5943
 * 
 * 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":5944
 * 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, 5944, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5946
 *     cuPythonInit()
 *     if __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":5945
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5948
 *         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":5949
 *             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":5943
 * 
 * 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":5942
 *     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":5951
 *     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], 5951, 1, __PYX_ERR(0, 5951, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5952
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsResourceGetMappedMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5953
 * 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, 5953, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5955
 *     cuPythonInit()
 *     if __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":5954
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5957
 *         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":5958
 *             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":5952
 * 
 * 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":5951
 *     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":5960
 *     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], 5960, 1, __PYX_ERR(0, 5960, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5961
 * 
 * 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":5962
 * 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, 5962, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5964
 *     cuPythonInit()
 *     if __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":5963
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5966
 *         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":5967
 *             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":5961
 * 
 * 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":5960
 *     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":5969
 *     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], 5969, 1, __PYX_ERR(0, 5969, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5970
 * 
 * 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":5971
 * 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, 5971, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5973
 *     cuPythonInit()
 *     if __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":5972
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5975
 *         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":5976
 *             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":5970
 * 
 * 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":5969
 *     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":5978
 *     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], 5978, 1, __PYX_ERR(0, 5978, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5979
 * 
 * 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":5980
 * 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, 5980, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5982
 *     cuPythonInit()
 *     if __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":5981
 *     global __cuGraphicsMapResources
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5984
 *         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":5985
 *             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":5979
 * 
 * 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":5978
 *     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":5987
 *     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], 5987, 1, __PYX_ERR(0, 5987, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5988
 * 
 * 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":5989
 * 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, 5989, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":5991
 *     cuPythonInit()
 *     if __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":5990
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5993
 *         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":5994
 *             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":5988
 * 
 * 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":5987
 *     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":5996
 *     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], 5996, 1, __PYX_ERR(0, 5996, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5997
 * 
 * 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":5998
 * 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, 5998, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":6000
 *     cuPythonInit()
 *     if __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":5999
 *     global __cuGetProcAddress
 *     cuPythonInit()
 *     if __cuGetProcAddress == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6002
 *         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":6003
 *             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":5997
 * 
 * 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":5996
 *     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":6005
 *     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], 6005, 1, __PYX_ERR(0, 6005, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6006
 * 
 * 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":6007
 * 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, 6007, __pyx_L4_error)

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

          /* "cuda/_cuda/ccuda.pyx":6009
 *     cuPythonInit()
 *     if __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":6008
 *     global __cuGetExportTable
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6011
 *         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":6012
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)
 *     return err             # <<<<<<<<<<<<<<
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6006
 * 
 * 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":6005
 *     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;
}

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_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_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_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_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_cuGraphNodeGetType_not, __pyx_k_Function_cuGraphNodeGetType_not, sizeof(__pyx_k_Function_cuGraphNodeGetType_not), 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_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_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_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_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_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_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_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 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_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, 394, __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":394
 *             handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW)
 *             if (handle == NULL):
 *                 raise RuntimeError('Failed to dlopen libcuda.so')             # <<<<<<<<<<<<<<
 *     # All Globals
 *     global __cuGetErrorString
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_Failed_to_dlopen_libcuda_so); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "cuda/_cuda/ccuda.pyx":2869
 *     if __cuGetErrorString == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)
 *     return err
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetErrorString_not_fo); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 2869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "cuda/_cuda/ccuda.pyx":2878
 *     if __cuGetErrorName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 *     return err
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetErrorName_not_foun); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "cuda/_cuda/ccuda.pyx":2887
 *     if __cuInit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 *     return err
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Function_cuInit_not_found); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 2887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "cuda/_cuda/ccuda.pyx":2896
 *     if __cuDriverGetVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 *     return err
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDriverGetVersion_not); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 2896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "cuda/_cuda/ccuda.pyx":2905
 *     if __cuDeviceGet == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 *     return err
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGet_not_found); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 2905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "cuda/_cuda/ccuda.pyx":2914
 *     if __cuDeviceGetCount == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 *     return err
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetCount_not_fo); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 2914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "cuda/_cuda/ccuda.pyx":2923
 *     if __cuDeviceGetName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)
 *     return err
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetName_not_fou); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 2923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "cuda/_cuda/ccuda.pyx":2932
 *     if __cuDeviceGetUuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 *     return err
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetUuid_not_fou); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "cuda/_cuda/ccuda.pyx":2941
 *     if __cuDeviceGetUuid_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)
 *     return err
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetUuid_v2_not); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "cuda/_cuda/ccuda.pyx":2950
 *     if __cuDeviceGetLuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)
 *     return err
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetLuid_not_fou); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "cuda/_cuda/ccuda.pyx":2959
 *     if __cuDeviceTotalMem_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)
 *     return err
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceTotalMem_v2_not); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "cuda/_cuda/ccuda.pyx":2968
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUarray_format, unsigned, CUdevice) nogil> __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev)
 *     return err
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetTexture1DLin); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 2968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "cuda/_cuda/ccuda.pyx":2977
 *     if __cuDeviceGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)
 *     return err
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetAttribute_no); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 2977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cuda/_cuda/ccuda.pyx":2986
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)
 *     return err
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetNvSciSyncAtt); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 2986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "cuda/_cuda/ccuda.pyx":2995
 *     if __cuDeviceSetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 *     return err
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceSetMemPool_not); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 2995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "cuda/_cuda/ccuda.pyx":3004
 *     if __cuDeviceGetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 *     return err
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetMemPool_not); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 3004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "cuda/_cuda/ccuda.pyx":3013
 *     if __cuDeviceGetDefaultMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 *     return err
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetDefaultMemPo); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 3013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "cuda/_cuda/ccuda.pyx":3022
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFlushGPUDirectRDMAWri); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 3022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "cuda/_cuda/ccuda.pyx":3031
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 *     return err
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetProperties_n); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "cuda/_cuda/ccuda.pyx":3040
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 *     return err
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceComputeCapabili); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 3040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "cuda/_cuda/ccuda.pyx":3049
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxRetai); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "cuda/_cuda/ccuda.pyx":3058
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 *     return err
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxRelea); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 3058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "cuda/_cuda/ccuda.pyx":3067
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 *     return err
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxSetFl); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "cuda/_cuda/ccuda.pyx":3076
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 *     return err
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxGetSt); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 3076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "cuda/_cuda/ccuda.pyx":3085
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxReset); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 3085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "cuda/_cuda/ccuda.pyx":3094
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)
 *     return err
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetExecAffinity); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 3094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "cuda/_cuda/ccuda.pyx":3103
 *     if __cuCtxCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice) nogil> __cuCtxCreate_v2)(pctx, flags, dev)
 *     return err
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxCreate_v2_not_foun); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 3103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "cuda/_cuda/ccuda.pyx":3112
 *     if __cuCtxCreate_v3 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUexecAffinityParam*, int, unsigned int, CUdevice) nogil> __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev)
 *     return err
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxCreate_v3_not_foun); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 3112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "cuda/_cuda/ccuda.pyx":3121
 *     if __cuCtxDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 *     return err
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDestroy_v2_not_fou); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 3121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "cuda/_cuda/ccuda.pyx":3130
 *     if __cuCtxPushCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 *     return err
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxPushCurrent_v2_not); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 3130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "cuda/_cuda/ccuda.pyx":3139
 *     if __cuCtxPopCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 *     return err
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxPopCurrent_v2_not); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 3139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "cuda/_cuda/ccuda.pyx":3148
 *     if __cuCtxSetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 *     return err
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetCurrent_not_fou); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 3148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "cuda/_cuda/ccuda.pyx":3157
 *     if __cuCtxGetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 *     return err
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetCurrent_not_fou); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 3157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "cuda/_cuda/ccuda.pyx":3166
 *     if __cuCtxGetDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 *     return err
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetDevice_not_foun); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 3166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "cuda/_cuda/ccuda.pyx":3175
 *     if __cuCtxGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 *     return err
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetFlags_not_found); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 3175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "cuda/_cuda/ccuda.pyx":3184
 *     if __cuCtxSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 *     return err
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSynchronize_not_fo); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 3184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "cuda/_cuda/ccuda.pyx":3193
 *     if __cuCtxSetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 *     return err
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetLimit_not_found); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "cuda/_cuda/ccuda.pyx":3202
 *     if __cuCtxGetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 *     return err
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetLimit_not_found); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 3202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "cuda/_cuda/ccuda.pyx":3211
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 *     return err
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetCacheConfig_not); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 3211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "cuda/_cuda/ccuda.pyx":3220
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 *     return err
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetCacheConfig_not); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 3220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "cuda/_cuda/ccuda.pyx":3229
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 *     return err
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetSharedMemConfig); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 3229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "cuda/_cuda/ccuda.pyx":3238
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 *     return err
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetSharedMemConfig); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 3238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "cuda/_cuda/ccuda.pyx":3247
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 *     return err
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetApiVersion_not); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 3247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "cuda/_cuda/ccuda.pyx":3256
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 *     return err
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetStreamPriorityR); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 3256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "cuda/_cuda/ccuda.pyx":3265
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 *     return err
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxResetPersistingL2C); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "cuda/_cuda/ccuda.pyx":3274
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 *     return err
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetExecAffinity_no); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 3274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "cuda/_cuda/ccuda.pyx":3283
 *     if __cuCtxAttach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 *     return err
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxAttach_not_found); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 3283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "cuda/_cuda/ccuda.pyx":3292
 *     if __cuCtxDetach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 *     return err
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDetach_not_found); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 3292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "cuda/_cuda/ccuda.pyx":3301
 *     if __cuModuleLoad == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 *     return err
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoad_not_found); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 3301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "cuda/_cuda/ccuda.pyx":3310
 *     if __cuModuleLoadData == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 *     return err
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadData_not_fo); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 3310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "cuda/_cuda/ccuda.pyx":3319
 *     if __cuModuleLoadDataEx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*, unsigned int, CUjit_option*, void**) nogil> __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues)
 *     return err
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadDataEx_not); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 3319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "cuda/_cuda/ccuda.pyx":3328
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 *     return err
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadFatBinary_n); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "cuda/_cuda/ccuda.pyx":3337
 *     if __cuModuleUnload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     return err
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleUnload_not_foun); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 3337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "cuda/_cuda/ccuda.pyx":3346
 *     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__55 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetFunction_not); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 3346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "cuda/_cuda/ccuda.pyx":3355
 *     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__56 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetGlobal_v2_no); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "cuda/_cuda/ccuda.pyx":3364
 *     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__57 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetTexRef_not_f); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 3364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "cuda/_cuda/ccuda.pyx":3373
 *     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__58 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetSurfRef_not); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 3373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "cuda/_cuda/ccuda.pyx":3382
 *     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__59 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkCreate_v2_not_fou); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 3382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "cuda/_cuda/ccuda.pyx":3391
 *     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__60 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkAddData_v2_not_fo); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 3391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "cuda/_cuda/ccuda.pyx":3400
 *     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__61 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkAddFile_v2_not_fo); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 3400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "cuda/_cuda/ccuda.pyx":3409
 *     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__62 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkComplete_not_foun); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 3409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "cuda/_cuda/ccuda.pyx":3418
 *     if __cuLinkDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)
 *     return err
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkDestroy_not_found); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "cuda/_cuda/ccuda.pyx":3427
 *     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__64 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetInfo_v2_not_fou); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 3427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "cuda/_cuda/ccuda.pyx":3436
 *     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__65 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAlloc_v2_not_found); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "cuda/_cuda/ccuda.pyx":3445
 *     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__66 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocPitch_v2_not); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 3445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "cuda/_cuda/ccuda.pyx":3454
 *     if __cuMemFree_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)
 *     return err
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFree_v2_not_found); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 3454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "cuda/_cuda/ccuda.pyx":3463
 *     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__68 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAddressRange_v2); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 3463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "cuda/_cuda/ccuda.pyx":3472
 *     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__69 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocHost_v2_not_f); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 3472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "cuda/_cuda/ccuda.pyx":3481
 *     if __cuMemFreeHost == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)
 *     return err
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFreeHost_not_found); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "cuda/_cuda/ccuda.pyx":3490
 *     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__71 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostAlloc_not_foun); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 3490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "cuda/_cuda/ccuda.pyx":3499
 *     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__72 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostGetDevicePoint); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 3499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "cuda/_cuda/ccuda.pyx":3508
 *     if __cuMemHostGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)
 *     return err
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostGetFlags_not_f); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 3508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "cuda/_cuda/ccuda.pyx":3517
 *     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__74 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocManaged_not_f); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 3517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "cuda/_cuda/ccuda.pyx":3526
 *     if __cuDeviceGetByPCIBusId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)
 *     return err
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetByPCIBusId_n); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 3526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "cuda/_cuda/ccuda.pyx":3535
 *     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__76 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetPCIBusId_not); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 3535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "cuda/_cuda/ccuda.pyx":3544
 *     if __cuIpcGetEventHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)
 *     return err
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcGetEventHandle_not); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 3544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "cuda/_cuda/ccuda.pyx":3553
 *     if __cuIpcOpenEventHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)
 *     return err
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcOpenEventHandle_no); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 3553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "cuda/_cuda/ccuda.pyx":3562
 *     if __cuIpcGetMemHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)
 *     return err
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcGetMemHandle_not_f); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "cuda/_cuda/ccuda.pyx":3571
 *     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__80 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcOpenMemHandle_v2_n); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 3571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "cuda/_cuda/ccuda.pyx":3580
 *     if __cuIpcCloseMemHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)
 *     return err
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcCloseMemHandle_not); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 3580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "cuda/_cuda/ccuda.pyx":3589
 *     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__82 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostRegister_v2_no); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "cuda/_cuda/ccuda.pyx":3598
 *     if __cuMemHostUnregister == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)
 *     return err
 */
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostUnregister_not); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 3598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "cuda/_cuda/ccuda.pyx":3607
 *     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__84 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy_not_found); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 3607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "cuda/_cuda/ccuda.pyx":3616
 *     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__85 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyPeer_not_found); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 3616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "cuda/_cuda/ccuda.pyx":3625
 *     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__86 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoD_v2_not_fou); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 3625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "cuda/_cuda/ccuda.pyx":3634
 *     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__87 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoH_v2_not_fou); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 3634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "cuda/_cuda/ccuda.pyx":3643
 *     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__88 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoD_v2_not_fou); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 3643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "cuda/_cuda/ccuda.pyx":3652
 *     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__89 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoA_v2_not_fou); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 3652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "cuda/_cuda/ccuda.pyx":3661
 *     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__90 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoD_v2_not_fou); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 3661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "cuda/_cuda/ccuda.pyx":3670
 *     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__91 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoA_v2_not_fou); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "cuda/_cuda/ccuda.pyx":3679
 *     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__92 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoH_v2_not_fou); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 3679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "cuda/_cuda/ccuda.pyx":3688
 *     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__93 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoA_v2_not_fou); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 3688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "cuda/_cuda/ccuda.pyx":3697
 *     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__94 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2D_v2_not_found); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 3697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "cuda/_cuda/ccuda.pyx":3706
 *     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__95 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2DUnaligned_v2); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 3706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "cuda/_cuda/ccuda.pyx":3715
 *     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__96 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3D_v2_not_found); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 3715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "cuda/_cuda/ccuda.pyx":3724
 *     if __cuMemcpy3DPeer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)
 *     return err
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DPeer_not_foun); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 3724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "cuda/_cuda/ccuda.pyx":3733
 *     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__98 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAsync_not_found); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 3733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "cuda/_cuda/ccuda.pyx":3742
 *     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__99 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyPeerAsync_not_f); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 3742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "cuda/_cuda/ccuda.pyx":3751
 *     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__100 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoDAsync_v2_no); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 3751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "cuda/_cuda/ccuda.pyx":3760
 *     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__101 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoHAsync_v2_no); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 3760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "cuda/_cuda/ccuda.pyx":3769
 *     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__102 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoDAsync_v2_no); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 3769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "cuda/_cuda/ccuda.pyx":3778
 *     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__103 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoAAsync_v2_no); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 3778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "cuda/_cuda/ccuda.pyx":3787
 *     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__104 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoHAsync_v2_no); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 3787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "cuda/_cuda/ccuda.pyx":3796
 *     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__105 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2DAsync_v2_not); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 3796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "cuda/_cuda/ccuda.pyx":3805
 *     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__106 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DAsync_v2_not); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 3805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "cuda/_cuda/ccuda.pyx":3814
 *     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__107 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DPeerAsync_not); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 3814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "cuda/_cuda/ccuda.pyx":3823
 *     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__108 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD8_v2_not_found); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 3823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "cuda/_cuda/ccuda.pyx":3832
 *     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__109 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD16_v2_not_foun); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 3832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "cuda/_cuda/ccuda.pyx":3841
 *     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__110 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD32_v2_not_foun); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "cuda/_cuda/ccuda.pyx":3850
 *     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__111 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D8_v2_not_fou); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 3850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "cuda/_cuda/ccuda.pyx":3859
 *     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__112 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D16_v2_not_fo); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 3859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "cuda/_cuda/ccuda.pyx":3868
 *     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__113 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D32_v2_not_fo); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 3868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "cuda/_cuda/ccuda.pyx":3877
 *     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__114 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD8Async_not_fou); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 3877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "cuda/_cuda/ccuda.pyx":3886
 *     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__115 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD16Async_not_fo); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 3886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "cuda/_cuda/ccuda.pyx":3895
 *     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__116 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD32Async_not_fo); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "cuda/_cuda/ccuda.pyx":3904
 *     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__117 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D8Async_not_f); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 3904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);

  /* "cuda/_cuda/ccuda.pyx":3913
 *     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__118 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D16Async_not); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 3913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "cuda/_cuda/ccuda.pyx":3922
 *     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__119 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D32Async_not); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "cuda/_cuda/ccuda.pyx":3931
 *     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__120 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayCreate_v2_not_fo); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 3931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "cuda/_cuda/ccuda.pyx":3940
 *     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__121 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetDescriptor_v2); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 3940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "cuda/_cuda/ccuda.pyx":3949
 *     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__122 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetSparsePropert); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 3949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "cuda/_cuda/ccuda.pyx":3958
 *     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__123 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayGetSpar); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "cuda/_cuda/ccuda.pyx":3967
 *     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__124 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetPlane_not_fou); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 3967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "cuda/_cuda/ccuda.pyx":3976
 *     if __cuArrayDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)
 *     return err
 */
  __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayDestroy_not_foun); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 3976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);

  /* "cuda/_cuda/ccuda.pyx":3985
 *     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__126 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArray3DCreate_v2_not); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 3985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "cuda/_cuda/ccuda.pyx":3994
 *     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__127 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArray3DGetDescriptor); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 3994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "cuda/_cuda/ccuda.pyx":4003
 *     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__128 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayCreate); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 4003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);

  /* "cuda/_cuda/ccuda.pyx":4012
 *     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__129 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayGetLeve); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 4012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);

  /* "cuda/_cuda/ccuda.pyx":4021
 *     if __cuMipmappedArrayDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)
 *     return err
 */
  __pyx_tuple__130 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayDestroy); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 4021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "cuda/_cuda/ccuda.pyx":4030
 *     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__131 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAddressReserve_not); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 4030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);

  /* "cuda/_cuda/ccuda.pyx":4039
 *     if __cuMemAddressFree == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)
 *     return err
 */
  __pyx_tuple__132 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAddressFree_not_fo); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 4039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);

  /* "cuda/_cuda/ccuda.pyx":4048
 *     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__133 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemCreate_not_found); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 4048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);

  /* "cuda/_cuda/ccuda.pyx":4057
 *     if __cuMemRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)
 *     return err
 */
  __pyx_tuple__134 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRelease_not_found); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);

  /* "cuda/_cuda/ccuda.pyx":4066
 *     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__135 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemMap_not_found); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 4066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);

  /* "cuda/_cuda/ccuda.pyx":4075
 *     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__136 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemMapArrayAsync_not); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 4075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "cuda/_cuda/ccuda.pyx":4084
 *     if __cuMemUnmap == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)
 *     return err
 */
  __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemUnmap_not_found); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 4084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);

  /* "cuda/_cuda/ccuda.pyx":4093
 *     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__138 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemSetAccess_not_foun); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "cuda/_cuda/ccuda.pyx":4102
 *     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__139 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAccess_not_foun); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);

  /* "cuda/_cuda/ccuda.pyx":4111
 *     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__140 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemExportToShareableH); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);

  /* "cuda/_cuda/ccuda.pyx":4120
 *     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__141 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemImportFromShareabl); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 4120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);

  /* "cuda/_cuda/ccuda.pyx":4129
 *     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__142 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAllocationGranu); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 4129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "cuda/_cuda/ccuda.pyx":4138
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 *     return err
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAllocationPrope); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 4138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "cuda/_cuda/ccuda.pyx":4147
 *     if __cuMemRetainAllocationHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 *     return err
 */
  __pyx_tuple__144 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRetainAllocationHa); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 4147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);

  /* "cuda/_cuda/ccuda.pyx":4156
 *     if __cuMemFreeAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)
 *     return err
 */
  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFreeAsync_not_foun); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 4156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "cuda/_cuda/ccuda.pyx":4165
 *     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__146 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocAsync_not_fou); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 4165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "cuda/_cuda/ccuda.pyx":4174
 *     if __cuMemPoolTrimTo == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)
 *     return err
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolTrimTo_not_fou); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 4174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "cuda/_cuda/ccuda.pyx":4183
 *     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__148 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolSetAttribute_n); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 4183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);

  /* "cuda/_cuda/ccuda.pyx":4192
 *     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__149 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolGetAttribute_n); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 4192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);

  /* "cuda/_cuda/ccuda.pyx":4201
 *     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__150 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolSetAccess_not); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);

  /* "cuda/_cuda/ccuda.pyx":4210
 *     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__151 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolGetAccess_not); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 4210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "cuda/_cuda/ccuda.pyx":4219
 *     if __cuMemPoolCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 *     return err
 */
  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolCreate_not_fou); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 4219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "cuda/_cuda/ccuda.pyx":4228
 *     if __cuMemPoolDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)
 *     return err
 */
  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolDestroy_not_fo); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 4228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "cuda/_cuda/ccuda.pyx":4237
 *     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__154 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocFromPoolAsync); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 4237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "cuda/_cuda/ccuda.pyx":4246
 *     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__155 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolExportToSharea); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 4246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "cuda/_cuda/ccuda.pyx":4255
 *     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__156 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolImportFromShar); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 4255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "cuda/_cuda/ccuda.pyx":4264
 *     if __cuMemPoolExportPointer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)
 *     return err
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolExportPointer); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 4264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);

  /* "cuda/_cuda/ccuda.pyx":4273
 *     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__158 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolImportPointer); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 4273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "cuda/_cuda/ccuda.pyx":4282
 *     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__159 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerGetAttribute_n); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 4282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);

  /* "cuda/_cuda/ccuda.pyx":4291
 *     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__160 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPrefetchAsync_not); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 4291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);

  /* "cuda/_cuda/ccuda.pyx":4300
 *     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__161 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAdvise_not_found); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 4300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);

  /* "cuda/_cuda/ccuda.pyx":4309
 *     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__162 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRangeGetAttribute); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 4309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);

  /* "cuda/_cuda/ccuda.pyx":4318
 *     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__163 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRangeGetAttributes); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 4318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "cuda/_cuda/ccuda.pyx":4327
 *     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__164 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerSetAttribute_n); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 4327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);

  /* "cuda/_cuda/ccuda.pyx":4336
 *     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__165 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerGetAttributes); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 4336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);

  /* "cuda/_cuda/ccuda.pyx":4345
 *     if __cuStreamCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)
 *     return err
 */
  __pyx_tuple__166 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCreate_not_foun); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 4345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);

  /* "cuda/_cuda/ccuda.pyx":4354
 *     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__167 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCreateWithPrior); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 4354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);

  /* "cuda/_cuda/ccuda.pyx":4363
 *     if __cuStreamGetPriority == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 *     return err
 */
  __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetPriority_not); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 4363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);

  /* "cuda/_cuda/ccuda.pyx":4372
 *     if __cuStreamGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 *     return err
 */
  __pyx_tuple__169 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetFlags_not_fo); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 4372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);

  /* "cuda/_cuda/ccuda.pyx":4381
 *     if __cuStreamGetCtx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)
 *     return err
 */
  __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCtx_not_foun); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 4381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);

  /* "cuda/_cuda/ccuda.pyx":4390
 *     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__171 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitEvent_not_f); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 4390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);

  /* "cuda/_cuda/ccuda.pyx":4399
 *     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__172 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamAddCallback_not); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 4399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);

  /* "cuda/_cuda/ccuda.pyx":4408
 *     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__173 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBeginCapture_v2); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 4408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);

  /* "cuda/_cuda/ccuda.pyx":4417
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 *     return err
 */
  __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_u_Function_cuThreadExchangeStreamC); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 4417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);

  /* "cuda/_cuda/ccuda.pyx":4426
 *     if __cuStreamEndCapture == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 *     return err
 */
  __pyx_tuple__175 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamEndCapture_not); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 4426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "cuda/_cuda/ccuda.pyx":4435
 *     if __cuStreamIsCapturing == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 *     return err
 */
  __pyx_tuple__176 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamIsCapturing_not); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 4435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);

  /* "cuda/_cuda/ccuda.pyx":4444
 *     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__177 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCaptureInfo); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 4444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);

  /* "cuda/_cuda/ccuda.pyx":4453
 *     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__178 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCaptureInfo_2); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 4453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);

  /* "cuda/_cuda/ccuda.pyx":4462
 *     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__179 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamUpdateCaptureDe); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 4462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);

  /* "cuda/_cuda/ccuda.pyx":4471
 *     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__180 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamAttachMemAsync); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 4471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);

  /* "cuda/_cuda/ccuda.pyx":4480
 *     if __cuStreamQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 *     return err
 */
  __pyx_tuple__181 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamQuery_not_found); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 4480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);

  /* "cuda/_cuda/ccuda.pyx":4489
 *     if __cuStreamSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 *     return err
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamSynchronize_not); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 4489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);

  /* "cuda/_cuda/ccuda.pyx":4498
 *     if __cuStreamDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 *     return err
 */
  __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamDestroy_v2_not); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 4498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "cuda/_cuda/ccuda.pyx":4507
 *     if __cuStreamCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)
 *     return err
 */
  __pyx_tuple__184 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCopyAttributes); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 4507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);

  /* "cuda/_cuda/ccuda.pyx":4516
 *     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__185 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetAttribute_no); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 4516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);

  /* "cuda/_cuda/ccuda.pyx":4525
 *     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__186 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamSetAttribute_no); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 4525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);

  /* "cuda/_cuda/ccuda.pyx":4534
 *     if __cuEventCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 *     return err
 */
  __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventCreate_not_found); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 4534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);

  /* "cuda/_cuda/ccuda.pyx":4543
 *     if __cuEventRecord == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)
 *     return err
 */
  __pyx_tuple__188 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventRecord_not_found); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);

  /* "cuda/_cuda/ccuda.pyx":4552
 *     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__189 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventRecordWithFlags); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 4552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);

  /* "cuda/_cuda/ccuda.pyx":4561
 *     if __cuEventQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 *     return err
 */
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventQuery_not_found); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);

  /* "cuda/_cuda/ccuda.pyx":4570
 *     if __cuEventSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 *     return err
 */
  __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventSynchronize_not); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 4570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);

  /* "cuda/_cuda/ccuda.pyx":4579
 *     if __cuEventDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)
 *     return err
 */
  __pyx_tuple__192 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventDestroy_v2_not_f); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 4579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);

  /* "cuda/_cuda/ccuda.pyx":4588
 *     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__193 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventElapsedTime_not); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 4588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);

  /* "cuda/_cuda/ccuda.pyx":4597
 *     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__194 = PyTuple_Pack(1, __pyx_kp_u_Function_cuImportExternalMemory); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 4597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);

  /* "cuda/_cuda/ccuda.pyx":4606
 *     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__195 = PyTuple_Pack(1, __pyx_kp_u_Function_cuExternalMemoryGetMapp); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);

  /* "cuda/_cuda/ccuda.pyx":4615
 *     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__196 = PyTuple_Pack(1, __pyx_kp_u_Function_cuExternalMemoryGetMapp_2); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 4615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);

  /* "cuda/_cuda/ccuda.pyx":4624
 *     if __cuDestroyExternalMemory == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)
 *     return err
 */
  __pyx_tuple__197 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDestroyExternalMemory); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 4624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);

  /* "cuda/_cuda/ccuda.pyx":4633
 *     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__198 = PyTuple_Pack(1, __pyx_kp_u_Function_cuImportExternalSemapho); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 4633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);

  /* "cuda/_cuda/ccuda.pyx":4642
 *     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__199 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSignalExternalSemapho); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 4642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);

  /* "cuda/_cuda/ccuda.pyx":4651
 *     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__200 = PyTuple_Pack(1, __pyx_kp_u_Function_cuWaitExternalSemaphore); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 4651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);

  /* "cuda/_cuda/ccuda.pyx":4660
 *     if __cuDestroyExternalSemaphore == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 *     return err
 */
  __pyx_tuple__201 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDestroyExternalSemaph); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 4660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);

  /* "cuda/_cuda/ccuda.pyx":4669
 *     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__202 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue32_not); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 4669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);

  /* "cuda/_cuda/ccuda.pyx":4678
 *     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__203 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue64_not); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 4678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "cuda/_cuda/ccuda.pyx":4687
 *     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__204 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue32_no); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 4687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);

  /* "cuda/_cuda/ccuda.pyx":4696
 *     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__205 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue64_no); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);

  /* "cuda/_cuda/ccuda.pyx":4705
 *     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__206 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBatchMemOp_not); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 4705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);

  /* "cuda/_cuda/ccuda.pyx":4714
 *     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__207 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncGetAttribute_not); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);

  /* "cuda/_cuda/ccuda.pyx":4723
 *     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__208 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetAttribute_not); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 4723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);

  /* "cuda/_cuda/ccuda.pyx":4732
 *     if __cuFuncSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 *     return err
 */
  __pyx_tuple__209 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetCacheConfig_no); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 4732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);

  /* "cuda/_cuda/ccuda.pyx":4741
 *     if __cuFuncSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 *     return err
 */
  __pyx_tuple__210 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetSharedMemConfi); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 4741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);

  /* "cuda/_cuda/ccuda.pyx":4750
 *     if __cuFuncGetModule == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)
 *     return err
 */
  __pyx_tuple__211 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncGetModule_not_fou); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 4750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);

  /* "cuda/_cuda/ccuda.pyx":4759
 *     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__212 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchKernel_not_foun); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 4759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);

  /* "cuda/_cuda/ccuda.pyx":4768
 *     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__213 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchCooperativeKern); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 4768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);

  /* "cuda/_cuda/ccuda.pyx":4777
 *     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__214 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchCooperativeKern_2); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 4777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);

  /* "cuda/_cuda/ccuda.pyx":4786
 *     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__215 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchHostFunc_not_fo); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);

  /* "cuda/_cuda/ccuda.pyx":4795
 *     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__216 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetBlockShape_not); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 4795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);

  /* "cuda/_cuda/ccuda.pyx":4804
 *     if __cuFuncSetSharedSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)
 *     return err
 */
  __pyx_tuple__217 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetSharedSize_not); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 4804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);

  /* "cuda/_cuda/ccuda.pyx":4813
 *     if __cuParamSetSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)
 *     return err
 */
  __pyx_tuple__218 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetSize_not_foun); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 4813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);

  /* "cuda/_cuda/ccuda.pyx":4822
 *     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__219 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSeti_not_found); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 4822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);

  /* "cuda/_cuda/ccuda.pyx":4831
 *     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__220 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetf_not_found); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 4831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);

  /* "cuda/_cuda/ccuda.pyx":4840
 *     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__221 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetv_not_found); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 4840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);

  /* "cuda/_cuda/ccuda.pyx":4849
 *     if __cuLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)
 *     return err
 */
  __pyx_tuple__222 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunch_not_found); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 4849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);

  /* "cuda/_cuda/ccuda.pyx":4858
 *     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__223 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchGrid_not_found); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 4858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);

  /* "cuda/_cuda/ccuda.pyx":4867
 *     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__224 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchGridAsync_not_f); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 4867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);

  /* "cuda/_cuda/ccuda.pyx":4876
 *     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__225 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetTexRef_not_fo); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 4876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);

  /* "cuda/_cuda/ccuda.pyx":4885
 *     if __cuGraphCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 *     return err
 */
  __pyx_tuple__226 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphCreate_not_found); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 4885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);

  /* "cuda/_cuda/ccuda.pyx":4894
 *     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__227 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddKernelNode_no); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 4894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);

  /* "cuda/_cuda/ccuda.pyx":4903
 *     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__228 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeGetPar); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 4903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);

  /* "cuda/_cuda/ccuda.pyx":4912
 *     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__229 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeSetPar); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 4912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);

  /* "cuda/_cuda/ccuda.pyx":4921
 *     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__230 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemcpyNode_no); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 4921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "cuda/_cuda/ccuda.pyx":4930
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__231 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemcpyNodeGetPar); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 4930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);

  /* "cuda/_cuda/ccuda.pyx":4939
 *     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__232 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemcpyNodeSetPar); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 4939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "cuda/_cuda/ccuda.pyx":4948
 *     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__233 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemsetNode_no); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 4948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);

  /* "cuda/_cuda/ccuda.pyx":4957
 *     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__234 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemsetNodeGetPar); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 4957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);

  /* "cuda/_cuda/ccuda.pyx":4966
 *     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__235 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemsetNodeSetPar); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 4966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);

  /* "cuda/_cuda/ccuda.pyx":4975
 *     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__236 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddHostNode_not); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 4975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);

  /* "cuda/_cuda/ccuda.pyx":4984
 *     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__237 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphHostNodeGetParam); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 4984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);

  /* "cuda/_cuda/ccuda.pyx":4993
 *     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__238 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphHostNodeSetParam); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 4993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);

  /* "cuda/_cuda/ccuda.pyx":5002
 *     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__239 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddChildGraphNod); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 5002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);

  /* "cuda/_cuda/ccuda.pyx":5011
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)
 *     return err
 */
  __pyx_tuple__240 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphChildGraphNodeGe); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 5011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);

  /* "cuda/_cuda/ccuda.pyx":5020
 *     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__241 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEmptyNode_not); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 5020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);

  /* "cuda/_cuda/ccuda.pyx":5029
 *     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__242 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEventRecordNo); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 5029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);

  /* "cuda/_cuda/ccuda.pyx":5038
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 *     return err
 */
  __pyx_tuple__243 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventRecordNodeG); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 5038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);

  /* "cuda/_cuda/ccuda.pyx":5047
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)
 *     return err
 */
  __pyx_tuple__244 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventRecordNodeS); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 5047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);

  /* "cuda/_cuda/ccuda.pyx":5056
 *     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__245 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEventWaitNode); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 5056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);

  /* "cuda/_cuda/ccuda.pyx":5065
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 *     return err
 */
  __pyx_tuple__246 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventWaitNodeGet); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 5065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);

  /* "cuda/_cuda/ccuda.pyx":5074
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)
 *     return err
 */
  __pyx_tuple__247 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventWaitNodeSet); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 5074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);

  /* "cuda/_cuda/ccuda.pyx":5083
 *     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__248 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddExternalSemap); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 5083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);

  /* "cuda/_cuda/ccuda.pyx":5092
 *     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__249 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 5092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);

  /* "cuda/_cuda/ccuda.pyx":5101
 *     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__250 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_2); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 5101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);

  /* "cuda/_cuda/ccuda.pyx":5110
 *     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__251 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddExternalSemap_2); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 5110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);

  /* "cuda/_cuda/ccuda.pyx":5119
 *     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__252 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_3); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 5119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);

  /* "cuda/_cuda/ccuda.pyx":5128
 *     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__253 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_4); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 5128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);

  /* "cuda/_cuda/ccuda.pyx":5137
 *     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__254 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemAllocNode); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 5137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);

  /* "cuda/_cuda/ccuda.pyx":5146
 *     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__255 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemAllocNodeGetP); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 5146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);

  /* "cuda/_cuda/ccuda.pyx":5155
 *     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__256 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemFreeNode_n); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 5155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "cuda/_cuda/ccuda.pyx":5164
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 *     return err
 */
  __pyx_tuple__257 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemFreeNodeGetPa); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 5164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);

  /* "cuda/_cuda/ccuda.pyx":5173
 *     if __cuDeviceGraphMemTrim == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 *     return err
 */
  __pyx_tuple__258 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGraphMemTrim_no); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 5173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "cuda/_cuda/ccuda.pyx":5182
 *     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__259 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetGraphMemAttr); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 5182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);

  /* "cuda/_cuda/ccuda.pyx":5191
 *     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__260 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceSetGraphMemAttr); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 5191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);

  /* "cuda/_cuda/ccuda.pyx":5200
 *     if __cuGraphClone == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)
 *     return err
 */
  __pyx_tuple__261 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphClone_not_found); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 5200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);

  /* "cuda/_cuda/ccuda.pyx":5209
 *     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__262 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeFindInClone); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 5209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);

  /* "cuda/_cuda/ccuda.pyx":5218
 *     if __cuGraphNodeGetType == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)
 *     return err
 */
  __pyx_tuple__263 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetType_not); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 5218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);

  /* "cuda/_cuda/ccuda.pyx":5227
 *     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__264 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetNodes_not_fou); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 5227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);

  /* "cuda/_cuda/ccuda.pyx":5236
 *     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__265 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetRootNodes_not); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 5236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);

  /* "cuda/_cuda/ccuda.pyx":5245
 *     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__266 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetEdges_not_fou); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 5245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);

  /* "cuda/_cuda/ccuda.pyx":5254
 *     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__267 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetDependenc); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 5254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);

  /* "cuda/_cuda/ccuda.pyx":5263
 *     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__268 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetDependent); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 5263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);

  /* "cuda/_cuda/ccuda.pyx":5272
 *     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__269 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddDependencies); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 5272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);

  /* "cuda/_cuda/ccuda.pyx":5281
 *     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__270 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphRemoveDependenci); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 5281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);

  /* "cuda/_cuda/ccuda.pyx":5290
 *     if __cuGraphDestroyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 *     return err
 */
  __pyx_tuple__271 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDestroyNode_not); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 5290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);

  /* "cuda/_cuda/ccuda.pyx":5299
 *     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__272 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphInstantiate_v2_n); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 5299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);

  /* "cuda/_cuda/ccuda.pyx":5308
 *     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__273 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphInstantiateWithF); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 5308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);

  /* "cuda/_cuda/ccuda.pyx":5317
 *     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__274 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecKernelNodeSe); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 5317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);

  /* "cuda/_cuda/ccuda.pyx":5326
 *     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__275 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecMemcpyNodeSe); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 5326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);

  /* "cuda/_cuda/ccuda.pyx":5335
 *     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__276 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecMemsetNodeSe); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 5335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);

  /* "cuda/_cuda/ccuda.pyx":5344
 *     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__277 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecHostNodeSetP); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 5344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);

  /* "cuda/_cuda/ccuda.pyx":5353
 *     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__278 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecChildGraphNo); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 5353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);

  /* "cuda/_cuda/ccuda.pyx":5362
 *     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__279 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecEventRecordN); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);

  /* "cuda/_cuda/ccuda.pyx":5371
 *     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__280 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecEventWaitNod); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 5371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);

  /* "cuda/_cuda/ccuda.pyx":5380
 *     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__281 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecExternalSema); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 5380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);

  /* "cuda/_cuda/ccuda.pyx":5389
 *     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__282 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecExternalSema_2); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 5389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);

  /* "cuda/_cuda/ccuda.pyx":5398
 *     if __cuGraphUpload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 *     return err
 */
  __pyx_tuple__283 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphUpload_not_found); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 5398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);

  /* "cuda/_cuda/ccuda.pyx":5407
 *     if __cuGraphLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 *     return err
 */
  __pyx_tuple__284 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphLaunch_not_found); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 5407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);

  /* "cuda/_cuda/ccuda.pyx":5416
 *     if __cuGraphExecDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 *     return err
 */
  __pyx_tuple__285 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecDestroy_not); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 5416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);

  /* "cuda/_cuda/ccuda.pyx":5425
 *     if __cuGraphDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 *     return err
 */
  __pyx_tuple__286 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDestroy_not_foun); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__286);
  __Pyx_GIVEREF(__pyx_tuple__286);

  /* "cuda/_cuda/ccuda.pyx":5434
 *     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__287 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecUpdate_not_f); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 5434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);

  /* "cuda/_cuda/ccuda.pyx":5443
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)
 *     return err
 */
  __pyx_tuple__288 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeCopyAt); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 5443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);

  /* "cuda/_cuda/ccuda.pyx":5452
 *     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__289 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeGetAtt); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 5452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__289);
  __Pyx_GIVEREF(__pyx_tuple__289);

  /* "cuda/_cuda/ccuda.pyx":5461
 *     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__290 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeSetAtt); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 5461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);

  /* "cuda/_cuda/ccuda.pyx":5470
 *     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__291 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDebugDotPrint_no); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 5470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);

  /* "cuda/_cuda/ccuda.pyx":5479
 *     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__292 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectCreate_not); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 5479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);

  /* "cuda/_cuda/ccuda.pyx":5488
 *     if __cuUserObjectRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)
 *     return err
 */
  __pyx_tuple__293 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectRetain_not); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 5488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);

  /* "cuda/_cuda/ccuda.pyx":5497
 *     if __cuUserObjectRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)
 *     return err
 */
  __pyx_tuple__294 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectRelease_not); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 5497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);

  /* "cuda/_cuda/ccuda.pyx":5506
 *     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__295 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphRetainUserObject); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 5506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "cuda/_cuda/ccuda.pyx":5515
 *     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__296 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphReleaseUserObjec); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 5515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__296);
  __Pyx_GIVEREF(__pyx_tuple__296);

  /* "cuda/_cuda/ccuda.pyx":5524
 *     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__297 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveBlo); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 5524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);

  /* "cuda/_cuda/ccuda.pyx":5533
 *     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__298 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 5533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);

  /* "cuda/_cuda/ccuda.pyx":5542
 *     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__299 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 5542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);

  /* "cuda/_cuda/ccuda.pyx":5551
 *     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__300 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential_2); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 5551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);

  /* "cuda/_cuda/ccuda.pyx":5560
 *     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__301 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyAvailableDyn); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 5560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "cuda/_cuda/ccuda.pyx":5569
 *     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__302 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetArray_not_fo); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 5569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);

  /* "cuda/_cuda/ccuda.pyx":5578
 *     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__303 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmappedArr); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 5578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);

  /* "cuda/_cuda/ccuda.pyx":5587
 *     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__304 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddress_v2_n); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 5587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);

  /* "cuda/_cuda/ccuda.pyx":5596
 *     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__305 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddress2D_v3); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 5596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);

  /* "cuda/_cuda/ccuda.pyx":5605
 *     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__306 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFormat_not_f); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);

  /* "cuda/_cuda/ccuda.pyx":5614
 *     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__307 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddressMode); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 5614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);

  /* "cuda/_cuda/ccuda.pyx":5623
 *     if __cuTexRefSetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)
 *     return err
 */
  __pyx_tuple__308 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFilterMode_n); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 5623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);

  /* "cuda/_cuda/ccuda.pyx":5632
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 *     return err
 */
  __pyx_tuple__309 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapFilter); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 5632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);

  /* "cuda/_cuda/ccuda.pyx":5641
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)
 *     return err
 */
  __pyx_tuple__310 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapLevelB); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 5641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);

  /* "cuda/_cuda/ccuda.pyx":5650
 *     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__311 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapLevelC); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 5650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__311);
  __Pyx_GIVEREF(__pyx_tuple__311);

  /* "cuda/_cuda/ccuda.pyx":5659
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 *     return err
 */
  __pyx_tuple__312 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMaxAnisotrop); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 5659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);

  /* "cuda/_cuda/ccuda.pyx":5668
 *     if __cuTexRefSetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 *     return err
 */
  __pyx_tuple__313 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetBorderColor); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 5668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);

  /* "cuda/_cuda/ccuda.pyx":5677
 *     if __cuTexRefSetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)
 *     return err
 */
  __pyx_tuple__314 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFlags_not_fo); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 5677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);

  /* "cuda/_cuda/ccuda.pyx":5686
 *     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__315 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetAddress_v2_n); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 5686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);

  /* "cuda/_cuda/ccuda.pyx":5695
 *     if __cuTexRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 *     return err
 */
  __pyx_tuple__316 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetArray_not_fo); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 5695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);

  /* "cuda/_cuda/ccuda.pyx":5704
 *     if __cuTexRefGetMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)
 *     return err
 */
  __pyx_tuple__317 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmappedArr); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 5704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);

  /* "cuda/_cuda/ccuda.pyx":5713
 *     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__318 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetAddressMode); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 5713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);

  /* "cuda/_cuda/ccuda.pyx":5722
 *     if __cuTexRefGetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)
 *     return err
 */
  __pyx_tuple__319 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFilterMode_n); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 5722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);

  /* "cuda/_cuda/ccuda.pyx":5731
 *     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__320 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFormat_not_f); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 5731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);

  /* "cuda/_cuda/ccuda.pyx":5740
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 *     return err
 */
  __pyx_tuple__321 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapFilter); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 5740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);

  /* "cuda/_cuda/ccuda.pyx":5749
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)
 *     return err
 */
  __pyx_tuple__322 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapLevelB); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 5749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);

  /* "cuda/_cuda/ccuda.pyx":5758
 *     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__323 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapLevelC); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 5758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);

  /* "cuda/_cuda/ccuda.pyx":5767
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 *     return err
 */
  __pyx_tuple__324 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMaxAnisotrop); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 5767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);

  /* "cuda/_cuda/ccuda.pyx":5776
 *     if __cuTexRefGetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 *     return err
 */
  __pyx_tuple__325 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetBorderColor); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 5776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);

  /* "cuda/_cuda/ccuda.pyx":5785
 *     if __cuTexRefGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 *     return err
 */
  __pyx_tuple__326 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFlags_not_fo); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 5785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);

  /* "cuda/_cuda/ccuda.pyx":5794
 *     if __cuTexRefCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 *     return err
 */
  __pyx_tuple__327 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefCreate_not_foun); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 5794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);

  /* "cuda/_cuda/ccuda.pyx":5803
 *     if __cuTexRefDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 *     return err
 */
  __pyx_tuple__328 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefDestroy_not_fou); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 5803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);

  /* "cuda/_cuda/ccuda.pyx":5812
 *     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__329 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfRefSetArray_not_f); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 5812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);

  /* "cuda/_cuda/ccuda.pyx":5821
 *     if __cuSurfRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)
 *     return err
 */
  __pyx_tuple__330 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfRefGetArray_not_f); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 5821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);

  /* "cuda/_cuda/ccuda.pyx":5830
 *     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__331 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectCreate_not_f); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 5830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);

  /* "cuda/_cuda/ccuda.pyx":5839
 *     if __cuTexObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 *     return err
 */
  __pyx_tuple__332 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectDestroy_not); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 5839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__332);
  __Pyx_GIVEREF(__pyx_tuple__332);

  /* "cuda/_cuda/ccuda.pyx":5848
 *     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__333 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetResourceD); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 5848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);

  /* "cuda/_cuda/ccuda.pyx":5857
 *     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__334 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetTextureDe); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 5857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);

  /* "cuda/_cuda/ccuda.pyx":5866
 *     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__335 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetResourceV); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 5866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);

  /* "cuda/_cuda/ccuda.pyx":5875
 *     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__336 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectCreate_not); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 5875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);

  /* "cuda/_cuda/ccuda.pyx":5884
 *     if __cuSurfObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 *     return err
 */
  __pyx_tuple__337 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectDestroy_not); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 5884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);

  /* "cuda/_cuda/ccuda.pyx":5893
 *     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__338 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectGetResource); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 5893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);

  /* "cuda/_cuda/ccuda.pyx":5902
 *     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__339 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceCanAccessPeer_n); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 5902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);

  /* "cuda/_cuda/ccuda.pyx":5911
 *     if __cuCtxEnablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 *     return err
 */
  __pyx_tuple__340 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxEnablePeerAccess_n); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 5911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);

  /* "cuda/_cuda/ccuda.pyx":5920
 *     if __cuCtxDisablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)
 *     return err
 */
  __pyx_tuple__341 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDisablePeerAccess); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 5920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);

  /* "cuda/_cuda/ccuda.pyx":5929
 *     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__342 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetP2PAttribute); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 5929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);

  /* "cuda/_cuda/ccuda.pyx":5938
 *     if __cuGraphicsUnregisterResource == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)
 *     return err
 */
  __pyx_tuple__343 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsUnregisterRes); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 5938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);

  /* "cuda/_cuda/ccuda.pyx":5947
 *     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__344 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsSubResourceGe); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 5947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);

  /* "cuda/_cuda/ccuda.pyx":5956
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)
 *     return err
 */
  __pyx_tuple__345 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 5956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);

  /* "cuda/_cuda/ccuda.pyx":5965
 *     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__346 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa_2); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 5965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);

  /* "cuda/_cuda/ccuda.pyx":5974
 *     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__347 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceSetMa); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 5974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);

  /* "cuda/_cuda/ccuda.pyx":5983
 *     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__348 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsMapResources); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 5983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);

  /* "cuda/_cuda/ccuda.pyx":5992
 *     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__349 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsUnmapResource); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 5992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__349);
  __Pyx_GIVEREF(__pyx_tuple__349);

  /* "cuda/_cuda/ccuda.pyx":6001
 *     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__350 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetProcAddress_not_fo); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 6001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);

  /* "cuda/_cuda/ccuda.pyx":6010
 *     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__351 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetExportTable_not_fo); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 6010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__351);
  __Pyx_GIVEREF(__pyx_tuple__351);
  __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_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("_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("_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)
  __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
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#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();
  (void)__Pyx_modinit_function_import_code();
  /*--- 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 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, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/_cuda/ccuda.pyx":16
 * 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":17
 * 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":18
 * 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":19
 * 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":20
 * 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":21
 * 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":22
 * 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":23
 * 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":24
 * 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":25
 * 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":26
 * 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":27
 * 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":28
 * 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":29
 * 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":30
 * 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":31
 * 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":32
 * 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":33
 * 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":34
 * 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":35
 * 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":36
 * 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":37
 * 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":38
 * 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":39
 * 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":40
 * 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":41
 * 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":42
 * 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":43
 * 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":44
 * 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":45
 * 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":46
 * 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":47
 * 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":48
 * 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":49
 * 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":50
 * 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":51
 * 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":52
 * 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":53
 * 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":54
 * cdef void *__cuCtxSynchronize = NULL
 * cdef void *__cuCtxSetLimit = NULL
 * cdef void *__cuCtxGetLimit = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetCacheConfig = NULL
 * cdef void *__cuCtxSetCacheConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit = NULL;

  /* "cuda/_cuda/ccuda.pyx":55
 * cdef void *__cuCtxSetLimit = NULL
 * cdef void *__cuCtxGetLimit = NULL
 * cdef void *__cuCtxGetCacheConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxSetCacheConfig = NULL
 * cdef void *__cuCtxGetSharedMemConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":56
 * cdef void *__cuCtxGetLimit = NULL
 * cdef void *__cuCtxGetCacheConfig = NULL
 * cdef void *__cuCtxSetCacheConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetSharedMemConfig = NULL
 * cdef void *__cuCtxSetSharedMemConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":57
 * cdef void *__cuCtxGetCacheConfig = NULL
 * cdef void *__cuCtxSetCacheConfig = NULL
 * cdef void *__cuCtxGetSharedMemConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxSetSharedMemConfig = NULL
 * cdef void *__cuCtxGetApiVersion = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":58
 * cdef void *__cuCtxSetCacheConfig = NULL
 * cdef void *__cuCtxGetSharedMemConfig = NULL
 * cdef void *__cuCtxSetSharedMemConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetApiVersion = NULL
 * cdef void *__cuCtxGetStreamPriorityRange = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":59
 * cdef void *__cuCtxGetSharedMemConfig = NULL
 * cdef void *__cuCtxSetSharedMemConfig = NULL
 * cdef void *__cuCtxGetApiVersion = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetStreamPriorityRange = NULL
 * cdef void *__cuCtxResetPersistingL2Cache = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion = NULL;

  /* "cuda/_cuda/ccuda.pyx":60
 * cdef void *__cuCtxSetSharedMemConfig = NULL
 * cdef void *__cuCtxGetApiVersion = NULL
 * cdef void *__cuCtxGetStreamPriorityRange = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxResetPersistingL2Cache = NULL
 * cdef void *__cuCtxGetExecAffinity = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange = NULL;

  /* "cuda/_cuda/ccuda.pyx":61
 * cdef void *__cuCtxGetApiVersion = NULL
 * cdef void *__cuCtxGetStreamPriorityRange = NULL
 * cdef void *__cuCtxResetPersistingL2Cache = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetExecAffinity = NULL
 * cdef void *__cuCtxAttach = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache = NULL;

  /* "cuda/_cuda/ccuda.pyx":62
 * cdef void *__cuCtxGetStreamPriorityRange = NULL
 * cdef void *__cuCtxResetPersistingL2Cache = NULL
 * cdef void *__cuCtxGetExecAffinity = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxAttach = NULL
 * cdef void *__cuCtxDetach = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity = NULL;

  /* "cuda/_cuda/ccuda.pyx":63
 * cdef void *__cuCtxResetPersistingL2Cache = NULL
 * cdef void *__cuCtxGetExecAffinity = NULL
 * cdef void *__cuCtxAttach = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxDetach = NULL
 * cdef void *__cuModuleLoad = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach = NULL;

  /* "cuda/_cuda/ccuda.pyx":64
 * cdef void *__cuCtxGetExecAffinity = NULL
 * cdef void *__cuCtxAttach = NULL
 * cdef void *__cuCtxDetach = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleLoad = NULL
 * cdef void *__cuModuleLoadData = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach = NULL;

  /* "cuda/_cuda/ccuda.pyx":65
 * cdef void *__cuCtxAttach = NULL
 * cdef void *__cuCtxDetach = NULL
 * cdef void *__cuModuleLoad = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleLoadData = NULL
 * cdef void *__cuModuleLoadDataEx = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad = NULL;

  /* "cuda/_cuda/ccuda.pyx":66
 * cdef void *__cuCtxDetach = NULL
 * cdef void *__cuModuleLoad = NULL
 * cdef void *__cuModuleLoadData = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleLoadDataEx = NULL
 * cdef void *__cuModuleLoadFatBinary = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData = NULL;

  /* "cuda/_cuda/ccuda.pyx":67
 * cdef void *__cuModuleLoad = NULL
 * cdef void *__cuModuleLoadData = NULL
 * cdef void *__cuModuleLoadDataEx = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleLoadFatBinary = NULL
 * cdef void *__cuModuleUnload = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx = NULL;

  /* "cuda/_cuda/ccuda.pyx":68
 * cdef void *__cuModuleLoadData = NULL
 * cdef void *__cuModuleLoadDataEx = NULL
 * cdef void *__cuModuleLoadFatBinary = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleUnload = NULL
 * cdef void *__cuModuleGetFunction = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary = NULL;

  /* "cuda/_cuda/ccuda.pyx":69
 * cdef void *__cuModuleLoadDataEx = NULL
 * cdef void *__cuModuleLoadFatBinary = NULL
 * cdef void *__cuModuleUnload = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetFunction = NULL
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload = NULL;

  /* "cuda/_cuda/ccuda.pyx":70
 * 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":71
 * 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":72
 * 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":73
 * 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":74
 * 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":75
 * 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":76
 * 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":77
 * 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":78
 * 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":79
 * 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":80
 * 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":81
 * 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":82
 * 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":83
 * 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":84
 * 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":85
 * 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":86
 * 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":87
 * 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":88
 * 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":89
 * 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":90
 * 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":91
 * 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":92
 * 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":93
 * 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":94
 * 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":95
 * 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":96
 * 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":97
 * 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":98
 * 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":99
 * 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":100
 * 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":101
 * 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":102
 * 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":103
 * 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":104
 * 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":105
 * 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":106
 * 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":107
 * 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":108
 * 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":109
 * 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":110
 * 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":111
 * 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":112
 * 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":113
 * 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":114
 * 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":115
 * 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":116
 * 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":117
 * 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":118
 * 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":119
 * 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":120
 * 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":121
 * 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":122
 * 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":123
 * 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":124
 * 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":125
 * 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":126
 * 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":127
 * 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":128
 * 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":129
 * 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":130
 * 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":131
 * 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":132
 * 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":133
 * 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":134
 * 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":135
 * 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":136
 * 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":137
 * cdef void *__cuArrayCreate_v2 = NULL
 * cdef void *__cuArrayGetDescriptor_v2 = NULL
 * cdef void *__cuArrayGetSparseProperties = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMipmappedArrayGetSparseProperties = NULL
 * cdef void *__cuArrayGetPlane = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties = NULL;

  /* "cuda/_cuda/ccuda.pyx":138
 * cdef void *__cuArrayGetDescriptor_v2 = NULL
 * cdef void *__cuArrayGetSparseProperties = NULL
 * cdef void *__cuMipmappedArrayGetSparseProperties = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArrayGetPlane = NULL
 * cdef void *__cuArrayDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties = NULL;

  /* "cuda/_cuda/ccuda.pyx":139
 * cdef void *__cuArrayGetSparseProperties = NULL
 * cdef void *__cuMipmappedArrayGetSparseProperties = 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":140
 * cdef void *__cuMipmappedArrayGetSparseProperties = 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":141
 * 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":142
 * 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":143
 * 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":144
 * 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":145
 * 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":146
 * 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":147
 * 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":148
 * 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":149
 * 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":150
 * 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":151
 * 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":152
 * 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":153
 * 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":154
 * 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":155
 * 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":156
 * 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":157
 * 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":158
 * 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":159
 * 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":160
 * 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":161
 * 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":162
 * 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":163
 * 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":164
 * 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":165
 * 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":166
 * 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":167
 * 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":168
 * 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":169
 * 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":170
 * 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":171
 * 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":172
 * 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":173
 * 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":174
 * 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":175
 * 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":176
 * 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":177
 * 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":178
 * 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":179
 * 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":180
 * 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":181
 * 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":182
 * 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":183
 * 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":184
 * 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":185
 * 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":186
 * 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":187
 * 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":188
 * 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":189
 * 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":190
 * 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":191
 * 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":192
 * 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":193
 * 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":194
 * 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":195
 * 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":196
 * 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":197
 * 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":198
 * 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":199
 * 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":200
 * 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":201
 * 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":202
 * 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":203
 * 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":204
 * 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":205
 * 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":206
 * 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":207
 * 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":208
 * 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":209
 * 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":210
 * 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":211
 * 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":212
 * 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":213
 * 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":214
 * 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":215
 * 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":216
 * 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":217
 * 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":218
 * 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":219
 * 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":220
 * 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":221
 * 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":222
 * 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":223
 * 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":224
 * 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":225
 * 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":226
 * 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":227
 * 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":228
 * 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":229
 * 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":230
 * 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":231
 * 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":232
 * 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":233
 * 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":234
 * 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":235
 * 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":236
 * 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":237
 * 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":238
 * 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":239
 * 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":240
 * 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":241
 * 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":242
 * 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":243
 * 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":244
 * 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":245
 * 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":246
 * 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":247
 * 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":248
 * 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":249
 * 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":250
 * 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":251
 * 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":252
 * 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":253
 * 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":254
 * 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":255
 * 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":256
 * 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":257
 * 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":258
 * 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":259
 * 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":260
 * 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":261
 * 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":262
 * 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":263
 * 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":264
 * 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":265
 * 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":266
 * 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":267
 * 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":268
 * 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":269
 * 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":270
 * 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":271
 * 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":272
 * 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":273
 * 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":274
 * 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":275
 * 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":276
 * 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":277
 * 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":278
 * 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":279
 * 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":280
 * 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":281
 * 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":282
 * 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":283
 * 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":284
 * 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":285
 * 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":286
 * 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":287
 * 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":288
 * 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":289
 * 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":290
 * 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":291
 * 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":292
 * 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":293
 * 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":294
 * 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":295
 * 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":296
 * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL
 * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL
 * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL
 * cdef void *__cuGraphUpload = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":297
 * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL
 * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphUpload = NULL
 * cdef void *__cuGraphLaunch = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":298
 * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = 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":299
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = 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":300
 * 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":301
 * 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":302
 * 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":303
 * 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":304
 * 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":305
 * 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":306
 * 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":307
 * 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":308
 * 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":309
 * 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":310
 * 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":311
 * 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":312
 * 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":313
 * 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":314
 * 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":315
 * 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":316
 * 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":317
 * 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":318
 * 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":319
 * 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":320
 * 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":321
 * 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":322
 * 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":323
 * 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":324
 * 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":325
 * 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":326
 * 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":327
 * 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":328
 * 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":329
 * 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":330
 * 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":331
 * 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":332
 * 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":333
 * 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":334
 * 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":335
 * 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":336
 * 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":337
 * 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":338
 * 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":339
 * 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":340
 * 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":341
 * 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":342
 * 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":343
 * 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":344
 * 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":345
 * 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":346
 * 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":347
 * 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":348
 * 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":349
 * 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":350
 * 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":351
 * 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":352
 * 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":353
 * 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":354
 * 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":355
 * 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":356
 * 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":357
 * 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":358
 * 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":359
 * 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":360
 * 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":361
 * 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":362
 * 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":363
 * 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":364
 * 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":365
 * cdef void *__cuGraphicsMapResources = NULL
 * cdef void *__cuGraphicsUnmapResources = NULL
 * cdef void *__cuGetProcAddress = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGetExportTable = NULL
 * 
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress = NULL;

  /* "cuda/_cuda/ccuda.pyx":366
 * cdef void *__cuGraphicsUnmapResources = NULL
 * cdef void *__cuGetProcAddress = NULL
 * cdef void *__cuGetExportTable = NULL             # <<<<<<<<<<<<<<
 * 
 * cdef int cuPythonInit() nogil except -1:
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable = NULL;

  /* "cuda/_cuda/ccuda.pyx":1
 * # Copyright 2021 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);
}

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

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

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

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