You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/04/26 19:58:47 UTC

[GitHub] marcoabreu commented on a change in pull request #10616: ensure same mkldnn engine is used for consistency

marcoabreu commented on a change in pull request #10616: ensure same mkldnn engine is used for consistency
URL: https://github.com/apache/incubator-mxnet/pull/10616#discussion_r184512853
 
 

 ##########
 File path: tests/python/mkl/test_mkldnn.py
 ##########
 @@ -89,6 +91,33 @@ def get_tensors(args, shapes, ctx):
     except:  # pylint: disable=bare-except
         assert 0, "test_mkldnn_model exception in bind and execution"
 
+def test_mkldnn_engine_threading():
+    """
+    This test will trigger mkldnn engine on different thread of execution
+    """
+
+    import mxnet as mx
+    from mxnet import gluon, nd
+
+    net = gluon.nn.HybridSequential()
+    with net.name_scope():
+        net.add(gluon.nn.Conv2D(channels=32, kernel_size=3, activation=None))
+    net.collect_params().initialize(ctx=mx.cpu())
+
+    val_data = gluon.data.DataLoader(
+        gluon.data.vision.CIFAR10(train=False),
+        batch_size=32, shuffle=False, num_workers=1)
 
 Review comment:
   Thanks a lot for this test! Could you please elaborate the exact behaviour of this unit test in the test with a block comment. I agree with Da that at the moment, it's hard to grasp the exact problem from reading the code. For me it's hard to understand when different threads are getting started and what the exact issue is.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services