Skip to content

Commit

Permalink
Reset all outputs before running an operator.
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
  • Loading branch information
mzient committed Sep 6, 2022
1 parent 41e8107 commit db026f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dali/pipeline/executor/executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,13 @@ void Executor<WorkspacePolicy, QueuePolicy>::RunHelper(OpNode &op_node, Workspac

for (int i = 0; i < ws.NumOutput(); i++) {
if (ws.template OutputIsType<CPUBackend>(i)) {
set_order(ws.template Output<CPUBackend>(i));
auto &out = ws.template Output<CPUBackend>(i);
out.Reset();
set_order(out);
} else {
set_order(ws.template Output<GPUBackend>(i));
auto &out = ws.template Output<GPUBackend>(i);
out.Reset();
set_order(out);
}
}

Expand Down

0 comments on commit db026f0

Please sign in to comment.