diff --git a/python/rmm/_lib/CMakeLists.txt b/python/rmm/_lib/CMakeLists.txt index 9e90d7e99..61caa0e7e 100644 --- a/python/rmm/_lib/CMakeLists.txt +++ b/python/rmm/_lib/CMakeLists.txt @@ -19,3 +19,5 @@ set(linked_libraries rmm::rmm) # Build all of the Cython targets rapids_cython_create_modules(SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" CXX) +# The cdef public functions in this file need to have a C ABI +target_compile_definitions(torch_allocator PRIVATE CYTHON_EXTERN_C=extern\ "C")