[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/LIBMKLDNN PATCH v2 4/4] Add patches.



Add patches to reduce mkl-dnn's memory consumption.

Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx>
---
 patches/0001-reduce-pagesize-used-by-scratchpad.patch        | 11 +++++++++++
 .../0002-remove-definition-of-XBYAK_USE_MMAP_ALLOCATOR.patch | 12 ++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 patches/0001-reduce-pagesize-used-by-scratchpad.patch
 create mode 100644 
patches/0002-remove-definition-of-XBYAK_USE_MMAP_ALLOCATOR.patch

diff --git a/patches/0001-reduce-pagesize-used-by-scratchpad.patch 
b/patches/0001-reduce-pagesize-used-by-scratchpad.patch
new file mode 100644
index 0000000..40bd2a1
--- /dev/null
+++ b/patches/0001-reduce-pagesize-used-by-scratchpad.patch
@@ -0,0 +1,11 @@
+--- a/src/common/scratchpad.cpp
++++ b/src/common/scratchpad.cpp
+@@ -23,7 +23,7 @@ namespace mkldnn {
+ namespace impl {
+ 
+ /* Allocating memory buffers on a page boundary to reduce TLB/page misses */
+-const size_t page_size = 2097152;
++const size_t page_size = 4096;
+ 
+ /*
+   Implementation of the scratchpad_t interface that is compatible with
diff --git a/patches/0002-remove-definition-of-XBYAK_USE_MMAP_ALLOCATOR.patch 
b/patches/0002-remove-definition-of-XBYAK_USE_MMAP_ALLOCATOR.patch
new file mode 100644
index 0000000..b6b8cd9
--- /dev/null
+++ b/patches/0002-remove-definition-of-XBYAK_USE_MMAP_ALLOCATOR.patch
@@ -0,0 +1,12 @@
+--- a/src/cpu/cpu_isa_traits.hpp
++++ b/src/cpu/cpu_isa_traits.hpp
+@@ -23,7 +23,7 @@
+ #define XBYAK_NO_OP_NAMES
+ /* in order to make selinux happy memory that would be marked with X-bit 
should
+  * be obtained with mmap */
+-#define XBYAK_USE_MMAP_ALLOCATOR
++/* #define XBYAK_USE_MMAP_ALLOCATOR */
+ #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+ /* turn off `size_t to other-type implicit casting` warning
+  * currently we have a lot of jit-generated instructions that
+
-- 
2.11.0


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.