File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ ctypedef unsigned long long MKL_UINT64
2929ctypedef int MKL_INT
3030
3131
32- cdef extern from " mkl.h" :
32+ cdef extern from " mkl.h" nogil :
3333 # MKL Function Domains Constants
3434 int MKL_DOMAIN_BLAS
3535 int MKL_DOMAIN_FFT
@@ -148,10 +148,10 @@ cdef extern from "mkl.h":
148148 MKL_INT64 mkl_mem_stat(int * buf)
149149 MKL_INT64 mkl_peak_mem_usage(int mode)
150150 int mkl_set_memory_limit(int mem_type, size_t limit)
151- void * mkl_malloc(size_t size, int alignment) nogil
152- void * mkl_realloc(void * ptr, size_t size) nogil
153- void * mkl_calloc(size_t num, size_t size, int alignment) nogil
154- void mkl_free(void * ptr) nogil
151+ void * mkl_malloc(size_t size, int alignment)
152+ void * mkl_realloc(void * ptr, size_t size)
153+ void * mkl_calloc(size_t num, size_t size, int alignment)
154+ void mkl_free(void * ptr)
155155
156156 # Conditional Numerical Reproducibility
157157 int mkl_cbwr_set(int settings)
Original file line number Diff line number Diff line change @@ -601,7 +601,8 @@ cdef inline void __free_buffers() noexcept:
601601 """
602602 Frees unused memory allocated by the Intel(R) MKL Memory Allocator.
603603 """
604- mkl.mkl_free_buffers()
604+ with nogil:
605+ mkl.mkl_free_buffers()
605606 return
606607
607608
@@ -610,7 +611,8 @@ cdef inline void __thread_free_buffers() noexcept:
610611 Frees unused memory allocated by the Intel(R) MKL Memory Allocator in the current
611612 thread.
612613 """
613- mkl.mkl_thread_free_buffers()
614+ with nogil:
615+ mkl.mkl_thread_free_buffers()
614616 return
615617
616618
You can’t perform that action at this time.
0 commit comments