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

Commit

Permalink
Fix MXNDArrayGetData (#16289)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhennanQin authored and pengzhao-intel committed Sep 27, 2019
1 parent c69c8bf commit f52ddfd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/c_api/c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,9 @@ int MXNDArrayGetData(NDArrayHandle handle,
API_BEGIN();
NDArray *arr = static_cast<NDArray*>(handle);
#if MXNET_USE_MKLDNN == 1
NDArray temp = *arr;
if (arr->IsMKLDNNData()) {
temp = arr->Reorder2Default();
arr = &temp;
arr->Reorder2DefaultAsync();
arr->WaitToRead();
}
#endif
if (!arr->is_none()) {
Expand Down

0 comments on commit f52ddfd

Please sign in to comment.