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 05:43:02 UTC

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

zheng-da 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_r184275445
 
 

 ##########
 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:
   can you remove this data loader? it doesn't seem this test needs to use it

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