Skip to content

Commit

Permalink
Fix MXNDArrayGetData (apache#16289)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhennanQin authored and larroy committed Sep 28, 2019
1 parent 3a5158c commit 4761f93
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 4761f93

Please sign in to comment.