Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Reorder2Default: return directly for default format (#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 e49fdae commit ab6a25e
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 ab6a25e

Please sign in to comment.