From 45381490c721566f5923c8e78466645e929ec387 Mon Sep 17 00:00:00 2001 From: Bartlomiej Gawrych Date: Wed, 7 Oct 2020 12:07:11 +0200 Subject: [PATCH] fix sanity --- src/operator/nn/mkldnn/mkldnn_rnn.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/operator/nn/mkldnn/mkldnn_rnn.cc b/src/operator/nn/mkldnn/mkldnn_rnn.cc index 1f45358508bb..34097e8e0416 100644 --- a/src/operator/nn/mkldnn/mkldnn_rnn.cc +++ b/src/operator/nn/mkldnn/mkldnn_rnn.cc @@ -50,7 +50,7 @@ inline int GetRnnGatesNum(int mode) { // Bug in oneDNN >= 1.6 in memory descriptor comparision operators. // for specific dims and strides in descriptors == operator can return `true` // but get_size() function will return different size -// TODO(bgawrych): Remove with oneDNN 1.7 upgrade +// TODO(bgawrych): Remove with oneDNN 1.7 upgrade bool CheckMemDescEquality(const mkldnn::memory::desc &left, const mkldnn::memory::desc &right) { return left == right && left.get_size() == right.get_size(); } @@ -830,13 +830,11 @@ void MKLDNNRnnBackward::SetDataGradsMem( void MKLDNNRnnBackward::SetNativeWeightsGrads() const { if (!CheckMemDescEquality(this->diff_weights_layer_->get_desc(), - this->diff_weights_layer_r_->get_desc())) - { + this->diff_weights_layer_r_->get_desc())) { MKLDNNMemoryReorder(*this->diff_weights_layer_, *this->diff_weights_layer_r_); } if (!CheckMemDescEquality(this->diff_weights_iter_->get_desc(), - this->diff_weights_iter_r_->get_desc())) - { + this->diff_weights_iter_r_->get_desc())) { MKLDNNMemoryReorder(*this->diff_weights_iter_, *this->diff_weights_iter_r_); } }