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

Commit

Permalink
Fix MXNDArrayGetData
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhennanQin committed Sep 26, 2019
1 parent c5007ea commit d21136e
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,11 +628,10 @@ 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()) {
*out_pdata = arr->data().dptr_;
Expand Down

0 comments on commit d21136e

Please sign in to comment.