From 882a650f0913770d1f850f72c1717bb71df2bfca Mon Sep 17 00:00:00 2001 From: Junru Shao Date: Sun, 23 Jul 2023 11:46:16 -0700 Subject: [PATCH] Fix Cython Error on macOS (#272) --- python/tvm/_ffi/_cython/ndarray.pxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/_ffi/_cython/ndarray.pxi b/python/tvm/_ffi/_cython/ndarray.pxi index b88698319f..dc689b47b5 100644 --- a/python/tvm/_ffi/_cython/ndarray.pxi +++ b/python/tvm/_ffi/_cython/ndarray.pxi @@ -22,7 +22,7 @@ cdef const char* _c_str_dltensor = "dltensor" cdef const char* _c_str_used_dltensor = "used_dltensor" -cdef void _c_dlpack_deleter(object pycaps): +cdef void _c_dlpack_deleter(object pycaps) noexcept: cdef DLManagedTensor* dltensor if pycapsule.PyCapsule_IsValid(pycaps, _c_str_dltensor): dltensor = pycapsule.PyCapsule_GetPointer(pycaps, _c_str_dltensor)