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-516656018
 
 
   With a CPU version I get the following, no crash:
   
   ```
   In [1]: from multiprocessing import Process
      ...: import gluonnlp as nlp
      ...: import numpy as np
      ...: from gluonnlp.data import SQuAD
      ...: from mxnet import nd,gluon
      ...: import mxnet as mx
      ...: from mxnet.gluon import nn
      ...:
      ...: class Transform(object):
      ...:     def __init__(self):
      ...:         pass
      ...:
      ...:     def __call__(self, record_index, question_id, question, context, 
answer_list,
      ...:                  answer_start_list):
      ...:         return np.ones((100,1)),np.ones((100,3))
      ...:
      ...: def train():
      ...:     train_data = SQuAD('train')
      ...:     dataloader = 
gluon.data.DataLoader(train_data.transform(Transform()),batch_size=128, 
shuffle=True, num_workers=4)
      ...:     net = nn.HybridSequential()
      ...:     net.add(nn.Dense(10))
      ...:     net.initialize(mx.init.Xavier(), ctx=mx.gpu(0))
      ...:     print(net)
      ...:
      ...: p = Process(target=train)
      ...: p.start()
      ...: p.join()
   Assertion failure at kmp_runtime.cpp(6481): __kmp_team_pool == __null.
   OMP: Error #13: Assertion failure at kmp_runtime.cpp(6481).
   OMP: Hint: Please submit a bug report with this message, compile and run 
commands used, and machine configuration info including native compiler and 
operating system versions. Faster response will be obtained by including all 
program sources. For information on submitting this issue, please see 
https://bugs.llvm.org/.
   
   In [2]:
   ```

----------------------------------------------------------------
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

Reply via email to