File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 2
2
#include < ATen/Config.h>
3
3
4
4
#if AT_MKLDNN_ENABLED()
5
+ #ifdef USE_MIMALLOC_ON_MKL
5
6
#include < c10/core/impl/alloc_cpu.h>
6
7
8
+ /*
9
+ MKL have a method to register memory allocation APIs via i_malloc.h, High
10
+ performance memory allocation APIs will help improve MKL performance.
11
+ Please check MKL online document:
12
+ https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-windows/2024-2/redefining-memory-functions.html
13
+ */
7
14
#include < i_malloc.h>
8
15
9
- #ifdef USE_MIMALLOC_ON_MKL
10
-
11
16
bool register_mimalloc_api_to_mkl ()
12
17
{
13
18
i_malloc = c10::mi_malloc_wrapper::c10_mi_malloc;
@@ -21,4 +26,3 @@ bool register_mimalloc_api_to_mkl()
21
26
static bool g_b_registered_mkl_alloction = register_mimalloc_api_to_mkl();
22
27
#endif
23
28
#endif
24
-
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ function(caffe2_print_configuration_summary)
164
164
message (STATUS " USE_OPENMP : ${USE_OPENMP} " )
165
165
message (STATUS " USE_MIMALLOC : ${USE_MIMALLOC} " )
166
166
if (${USE_MIMALLOC} )
167
- message (STATUS " USE_MIMALLOC_ON_MKL : ${USE_MIMALLOC_ON_MKL} " )
167
+ message (STATUS " USE_MIMALLOC_ON_MKL : ${USE_MIMALLOC_ON_MKL} " )
168
168
endif ()
169
169
message (STATUS " USE_VULKAN : ${USE_VULKAN} " )
170
170
if (${USE_VULKAN} )
You can’t perform that action at this time.
0 commit comments