Using High-bandwidth Memory with
oneMKL
oneMKL
To achieve maximum performance,
may use the memkind library (https://github.com/memkind/memkind), which enables controlling memory characteristics and partitioning the heap between different kinds of memory. By default
memory manager tries to allocate memory to Multi-Channel Dynamic Random Access Memory (MCDRAM) using the memkind library on the 2 memory manager falls back to a regular system allocator.
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
nd
generation Intel® Xeon Phi™ product family (for more details of MCDRAM, see
https://software.intel.com/content/www/us/en/develop/articles/mcdram-high-bandwidth-memory-on-knights-landing-analysis-methods-tools.html). If allocation of memory to MCDRAM is not possible at the moment,
Intel® oneAPI Math Kernel Library
By default the amount of MCDRAM available for
is unlimited. To control the amount of MCDRAM available for
, do either of the following:
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
- Callmkl_set_memory_limit (MKL_MEM_MCDRAM,<limit_in_mbytes>)
- Set the environment variable:
- For the bash shell:MKL_FAST_MEMORY_LIMIT="<limit_in_mbytes>"
- For a C shell (csh or tcsh):setenv MKL_FAST_MEMORY_LIMIT "<limit_in_mbytes>"
The setting of the limit affects all
functions, including user-callable memory functions such as
Intel® oneAPI Math Kernel Library
mkl_malloc
. Therefore, if an application calls
mkl_malloc
,
mkl_calloc
, or
mkl_realloc
, which always tries to allocate memory to MCDRAM, make sure that the limit is sufficient.
If you replace
memory management functions with your own functions (for details, see
Redefining Memory Functions),
uses your functions and does not work with the memkind library directly.
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
Product and Performance Information
|
---|
Performance varies by use, configuration and other factors. Learn more at
www.Intel.com/PerformanceIndex.
Notice revision #20201201
|