From commits-return-33262-archive-asf-public=cust-asf.ponee.io@mxnet.incubator.apache.org Thu Apr 26 22:36:58 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 92A54180648 for ; Thu, 26 Apr 2018 22:36:58 +0200 (CEST) Received: (qmail 82642 invoked by uid 500); 26 Apr 2018 20:36:57 -0000 Mailing-List: contact commits-help@mxnet.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mxnet.incubator.apache.org Delivered-To: mailing list commits@mxnet.incubator.apache.org Received: (qmail 82629 invoked by uid 99); 26 Apr 2018 20:36:57 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2018 20:36:57 +0000 From: GitBox To: commits@mxnet.apache.org Subject: [GitHub] ashokei commented on a change in pull request #10616: ensure same mkldnn engine is used for consistency Message-ID: <152477501718.31488.13733853241408478663.gitbox@gitbox.apache.org> Date: Thu, 26 Apr 2018 20:36:57 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit ashokei 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_r184523143 ########## 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: Gluon DataLoader allows us to create a new thread as it iterates over data batch. Added comments to PR. ---------------------------------------------------------------- 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