Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tensorflow/workspace2.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def _tf_repositories():
"//third_party/mkl_dnn:onednn_acl_fixed_format_kernels.patch",
"//third_party/mkl_dnn:onednn_acl_depthwise_convolution.patch",
"//third_party/mkl_dnn:onednn_acl_threadpool_scheduler.patch",
"//third_party/mkl_dnn:onednn_unwind_stack.patch",
],
sha256 = "a50993aa6265b799b040fe745e0010502f9f7103cc53a9525d59646aef006633",
strip_prefix = "oneDNN-2.7.3",
Expand Down
1 change: 0 additions & 1 deletion third_party/mkl_dnn/mkldnn_v1.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ _COPTS_LIST = select({
"-UUSE_MKL",
"-UUSE_CBLAS",
"-DDNNL_ENABLE_MAX_CPU_ISA",
"-DDNNL_ENABLE_MEM_DEBUG",
] + tf_openmp_copts()

_INCLUDES_LIST = [
Expand Down
33 changes: 33 additions & 0 deletions third_party/mkl_dnn/onednn_unwind_stack.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
commit 2ae24507835242a8d217b40fde629ef671b904de
Author: Wierschem, Keola <keola.wierschem@intel.com>
Date: Thu Sep 15 15:31:30 2022 -0700

cpu: x64: update RBP on entry to jit code

diff --git a/src/cpu/x64/jit_generator.hpp b/src/cpu/x64/jit_generator.hpp
index 60ec65211c..6399bc64d1 100644
--- a/src/cpu/x64/jit_generator.hpp
+++ b/src/cpu/x64/jit_generator.hpp
@@ -103,8 +103,8 @@ static inline void tc_configure_tile(

#ifdef XBYAK64
constexpr Xbyak::Operand::Code abi_save_gpr_regs[] = {
- Xbyak::Operand::RBX,
Xbyak::Operand::RBP,
+ Xbyak::Operand::RBX,
Xbyak::Operand::R12,
Xbyak::Operand::R13,
Xbyak::Operand::R14,
@@ -194,8 +194,11 @@ public:
uni_vmovdqu(ptr[rsp + i * xmm_len],
Xbyak::Xmm(xmm_to_preserve_start + i));
}
- for (size_t i = 0; i < num_abi_save_gpr_regs; ++i)
+ for (size_t i = 0; i < num_abi_save_gpr_regs; ++i) {
push(Xbyak::Reg64(abi_save_gpr_regs[i]));
+ // Stack magic: save rsp into rbp state to be able to unwind stack.
+ if (i == 0) mov(rbp, rsp);
+ }
#ifndef DNNL_ENABLE_MEM_DEBUG
// do not use RBP in mem debug mode to enable backtracing from jit code
if (is_valid_isa(avx512_core)) {