You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2021/02/21 03:48:46 UTC
[incubator-mxnet] branch master updated: WAR the dataloader issue
with forked processes holding stale references (#19925)
This is an automated email from the ASF dual-hosted git repository.
zha0q1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new fee8bf4 WAR the dataloader issue with forked processes holding stale references (#19925)
fee8bf4 is described below
commit fee8bf4fbbf8e2b56b006852607bb7df9e14e84f
Author: Przemyslaw Tredak <pt...@nvidia.com>
AuthorDate: Sat Feb 20 19:46:51 2021 -0800
WAR the dataloader issue with forked processes holding stale references (#19925)
---
python/mxnet/gluon/data/dataloader.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/python/mxnet/gluon/data/dataloader.py b/python/mxnet/gluon/data/dataloader.py
index 3d515c9..6b1f758 100644
--- a/python/mxnet/gluon/data/dataloader.py
+++ b/python/mxnet/gluon/data/dataloader.py
@@ -650,6 +650,10 @@ class DataLoader(object):
pin_device_id=self._pin_device_id,
prefetch=self._prefetch, **mx_iter_args)
else:
+ nd.waitall()
+ import gc
+ gc.collect()
+ nd.waitall()
if self._num_workers > 0:
if self._thread_pool:
self._worker_pool = ThreadPool(self._num_workers,