Download Intel(R) MKL User's Guide

Transcript
6
Intel® Math Kernel Library User’s Guide
FFT Optimized Radices
You can improve the performance of Intel MKL FFT if the length of your data vector permits
factorization into powers of optimized radices.
In Intel MKL, the optimized radices are 2, 3, 5, 7, and 11.
Using the Intel® MKL Memory Management
Intel MKL has memory management software that controls memory buffers for the use by
the library functions. New buffers that the library allocates when your application calls
certain functions (Level 3 BLAS or FFT) are not deallocated until the program ends. To get
the amount of memory allocated by the memory management software, call the
mkl_mem_stat() function. If your program needs to free memory, call
mkl_free_buffers(). If another call is made to a library function that needs a memory
buffer, the memory manager will again allocate the buffers and they will again remain
allocated until either the program ends or the program deallocates the memory.
This behavior facilitates better performance. However, some tools may report this behavior
as a memory leak. In addition to calling the mkl_free_buffers() function, you can
release (free) memory in your program by setting an environment variable.
The memory management software is turned on by default, which leaves memory
allocated by calls to Level 3 BLAS and FFT until the program ends. To disable this behavior
of the memory management software, set the MKL_DISABLE_FAST_MM environment
variable to any value, which will cause memory to be allocated and freed from call to call.
Disabling this feature will negatively impact performance of routines such as the level 3
BLAS, especially for small problem sizes.
Using one of these methods to release memory will not necessarily stop programs from
reporting memory leaks, and, in fact, may increase the number of such reports in case you
make multiple calls to the library, thereby requiring new allocations with each call. Memory
not released by one of the methods described previously will be released by the system
when the program ends.
Redefining Memory Functions
C/C++ users of Intel MKL can replace memory functions that the library uses by default
with their own ones. The memory renaming feature enables this replacement.
Memory Renaming
Intel MKL memory management by default uses standard C run-time memory functions to
allocate or free memory. These functions can be replaced using memory renaming.
6-18