larroy commented on issue #14979: [BUG] Using a package with MKL and GPU versions, using python to open a new process will cause an error URL: https://github.com/apache/incubator-mxnet/issues/14979#issuecomment-525103206 Added this patch in data loader but is not needed: ``` diff --git a/3rdparty/dmlc-core b/3rdparty/dmlc-core --- a/3rdparty/dmlc-core +++ b/3rdparty/dmlc-core @@ -1 +1 @@ -Subproject commit f1ff6cc117f4e95169a9f62be549c8fe3e15c20f +Subproject commit f1ff6cc117f4e95169a9f62be549c8fe3e15c20f-dirty diff --git a/python/mxnet/gluon/data/dataloader.py b/python/mxnet/gluon/data/dataloader.py index 4dfa94f72..c58fd22e2 100644 --- a/python/mxnet/gluon/data/dataloader.py +++ b/python/mxnet/gluon/data/dataloader.py @@ -462,6 +462,9 @@ class _MultiWorkerIter(object): def __iter__(self): return self +def f(*args): + import os + print("pid: {}".format(os.getpid())) class DataLoader(object): @@ -562,6 +565,7 @@ class DataLoader(object): else: self._worker_pool = multiprocessing.Pool( self._num_workers, initializer=_worker_initializer, initargs=[self._dataset]) + self._worker_pool.map(f, range(self._num_workers)) if batchify_fn is None: if num_workers > 0: self._batchify_fn = default_mp_batchify_fn ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
