Avoiding Memory Leaks in
oneMKL
oneMKL
When running,
allocates and deallocates internal buffers to facilitate better performance. However, in some cases this behavior may result in memory leaks.
Intel® oneAPI Math Kernel Library
To avoid memory leaks, you can do either of the following:
- Set theMKL_DISABLE_FAST_MMenvironment variable to 1 or call themkl_disable_fast_mm()function.Be aware that this change may negatively impact performance of somefunctions, especially for small problem sizes.Intel® oneAPI Math Kernel Library
- Call themkl_free_buffers()function or themkl_thread_free_buffers()function in the current thread.
For the descriptions of the memory functions, see the
Developer Reference, available in the Intel Software Documentation Library.
Intel® oneAPI Math Kernel Library