Skip to content

Commit 2a5e14c

Browse files
ptrendxJanuszL
authored andcommitted
Remove double-buffering on the MXNet side (#258)
Signed-off-by: ptredak <[email protected]>
1 parent db82480 commit 2a5e14c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dali/python/nvidia/dali/plugin/mxnet.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def __init__(self,
9696
for p in self._pipes:
9797
p.build()
9898
# Use double-buffering of data batches
99-
self._data_batches = [[None, None] for i in range(self._num_gpus)]
99+
self._data_batches = [[None] for i in range(self._num_gpus)]
100100
self._counter = 0
101101
self._current_data_batch = 0
102102
self.output_map = output_map
@@ -168,7 +168,7 @@ def __next__(self):
168168

169169
copy_db_index = self._current_data_batch
170170
# Change index for double buffering
171-
self._current_data_batch = (self._current_data_batch + 1) % 2
171+
self._current_data_batch = (self._current_data_batch + 1) % 1
172172
self._counter += self._num_gpus * self.batch_size
173173

174174
# padding the last batch

0 commit comments

Comments
 (0)