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

Commit

Permalink
revert in place diff
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 committed Aug 28, 2018
1 parent d875592 commit bea0609
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/executor/attach_op_execs_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class StatefulComputeExExecutor : public OpExecutor {
op_ctx.run_ctx = rctx;
#if MXNET_USE_MKLDNN == 1
InvalidateOutputs(out_array, req);
CreateDefaultInputs(in_array, in_array_fallback);
CreateDefaultInputs(in_array, &in_array_fallback);
fcompute_(state_, op_ctx, in_array_fallback, req, out_array);
return;
#endif
Expand Down Expand Up @@ -232,7 +232,7 @@ class FComputeExExecutor : public OpExecutor {
// TODO(alex): (MXNET-847) Remove this fallback feature after subgraph implemented
const auto is_mkldnn = Op::GetAttr<bool>("TIsMKLDNN");
if (!is_mkldnn.get(attrs_.op, false)) {
CreateDefaultInputs(in_array, in_array_fallback);
CreateDefaultInputs(in_array, &in_array_fallback);
fcompute_(attrs_, op_ctx, in_array_fallback, req, out_array);
return;
}
Expand Down
6 changes: 3 additions & 3 deletions src/operator/nn/mkldnn/mkldnn_base-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ static inline void InvalidateOutputs(const std::vector<NDArray> &arrs,

// TODO(alexzai): (MXNET-856) Remove helper function after subgraph feature added
static inline void CreateDefaultInputs(const std::vector<NDArray> &arrs,
const std::vector<NDArray> &out_arrs) {
std::vector<NDArray> *out_arrs) {
for (size_t i = 0; i < arrs.size(); ++i) {
if (arrs[i].IsMKLDNNData())
out_arrs[i] = arrs[i].Reorder2Default();
out_arrs->emplace_back(arrs[i].Reorder2Default());
else
out_arrs[i] = arrs[i];
out_arrs->emplace_back(arrs[i]);
}
}

Expand Down

0 comments on commit bea0609

Please sign in to comment.