Skip to content

Commit

Permalink
fixes for JetPack 4
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-nv committed Jun 20, 2024
1 parent dac4f06 commit 903fae3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion python/bindings/PyCUDA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ PyObject* PyCUDA_StreamWaitEvent( PyObject* self, PyObject* args )
if( !PyArg_ParseTuple(args, "KK", &stream, &event) )
return NULL;

PYCUDA_ASSERT(cudaStreamWaitEvent(stream, event));
PYCUDA_ASSERT(cudaStreamWaitEvent(stream, event, 0));

Py_RETURN_NONE;
}
Expand Down
23 changes: 12 additions & 11 deletions python/bindings/PyUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
#define PYTHON_3
#endif

#define PYLONG_AS_LONG(x) PyLong_AsLong(x)
#define PYLONG_FROM_LONG(x) PyLong_FromLong(x)
#define PYLONG_AS_LONG(x) PyLong_AsLong(x)
#define PYLONG_FROM_LONG(x) PyLong_FromLong(x)
#define PYLONG_FROM_UNSIGNED_LONG(x) PyLong_FromUnsignedLong(x)
#define PYLONG_FROM_UNSIGNED_LONG_LONG(x) PyLong_FromUnsignedLongLong(x)
#define PYLONG_FROM_PTR(x) PyLong_FromUnsignedLongLong((uint64_t)x)

#define PYSTRING_CHECK PyUnicode_Check
#define PYSTRING_AS_STRING PyUnicode_AsUTF8
#define PYSTRING_CHECK PyUnicode_Check
#define PYSTRING_AS_STRING PyUnicode_AsUTF8
#define PYSTRING_FROM_STRING PyUnicode_FromString
#define PYSTRING_FROM_FORMAT PyUnicode_FromFormat

Expand All @@ -58,13 +58,14 @@
#define PYTHON_2
#endif

#define PYLONG_AS_LONG(x) PyInt_AsLong(x)
#define PYLONG_FROM_LONG(x) PyInt_FromLong(x)
#define PYLONG_FROM_UNSIGNED_LONG(x) PyInt_FromLong(x)
#define PYLONG_FROM_UNSIGNED_LONG_LONG(x) PyInt_FromLong((long)x)

#define PYSTRING_CHECK PyString_Check
#define PYSTRING_AS_STRING PyString_AsString
#define PYLONG_AS_LONG(x) PyInt_AsLong(x)
#define PYLONG_FROM_LONG(x) PyInt_FromLong(x)
#define PYLONG_FROM_UNSIGNED_LONG(x) PyLong_FromUnsignedLong(x)
#define PYLONG_FROM_UNSIGNED_LONG_LONG(x) PyLong_FromUnsignedLongLong((long)x)
#define PYLONG_FROM_PTR(x) PyLong_FromUnsignedLongLong((uint64_t)x)

#define PYSTRING_CHECK PyString_Check
#define PYSTRING_AS_STRING PyString_AsString
#define PYSTRING_FROM_STRING PyString_FromString
#define PYSTRING_FROM_FORMAT PyString_FromFormat

Expand Down

0 comments on commit 903fae3

Please sign in to comment.