Skip to content

Commit

Permalink
Remove double-buffering on the MXNet side (#258)
Browse files Browse the repository at this point in the history
Signed-off-by: ptredak <[email protected]>
  • Loading branch information
ptrendx authored and JanuszL committed Oct 31, 2018
1 parent db82480 commit 2a5e14c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dali/python/nvidia/dali/plugin/mxnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(self,
for p in self._pipes:
p.build()
# Use double-buffering of data batches
self._data_batches = [[None, None] for i in range(self._num_gpus)]
self._data_batches = [[None] for i in range(self._num_gpus)]
self._counter = 0
self._current_data_batch = 0
self.output_map = output_map
Expand Down Expand Up @@ -168,7 +168,7 @@ def __next__(self):

copy_db_index = self._current_data_batch
# Change index for double buffering
self._current_data_batch = (self._current_data_batch + 1) % 2
self._current_data_batch = (self._current_data_batch + 1) % 1
self._counter += self._num_gpus * self.batch_size

# padding the last batch
Expand Down

0 comments on commit 2a5e14c

Please sign in to comment.