Skip to content

Commit

Permalink
Reorder2Default: return directly for default format (apache#10810)
Browse files Browse the repository at this point in the history
  • Loading branch information
TaoLv authored and piiswrong committed May 4, 2018
1 parent 2b101b4 commit 5328f36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ndarray/ndarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ void NDArray::Chunk::Reorder2Default() {
return;

mkldnn_memory_format_t format = mkl_mem_->GetDefaultFormat();
CHECK_NE(format, mkl_mem_->GetFormat());
if (format == mkl_mem_->GetFormat())
return;

mkldnn::memory::primitive_desc def_pd = mkl_mem_->GetPrimitiveDesc(format);
mkldnn_mem_ptr def_mem(new mkldnn::memory(def_pd));
Expand Down

0 comments on commit 5328f36

Please sign in to comment.