Return-Path: X-Original-To: apmail-singa-dev-archive@minotaur.apache.org Delivered-To: apmail-singa-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8209418FF6 for ; Sat, 8 Aug 2015 13:26:54 +0000 (UTC) Received: (qmail 63655 invoked by uid 500); 8 Aug 2015 13:26:54 -0000 Delivered-To: apmail-singa-dev-archive@singa.apache.org Received: (qmail 63632 invoked by uid 500); 8 Aug 2015 13:26:54 -0000 Mailing-List: contact dev-help@singa.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.incubator.apache.org Delivered-To: mailing list dev@singa.incubator.apache.org Received: (qmail 63622 invoked by uid 99); 8 Aug 2015 13:26:54 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Aug 2015 13:26:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0689119EF4B for ; Sat, 8 Aug 2015 13:26:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.991 X-Spam-Level: X-Spam-Status: No, score=0.991 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id nb_Tc4Q2xMOC for ; Sat, 8 Aug 2015 13:26:46 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id EAB4E2100B for ; Sat, 8 Aug 2015 13:26:45 +0000 (UTC) Received: (qmail 62262 invoked by uid 99); 8 Aug 2015 13:26:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Aug 2015 13:26:45 +0000 Date: Sat, 8 Aug 2015 13:26:45 +0000 (UTC) From: "wangwei (JIRA)" To: dev@singa.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (SINGA-45) Set openblas num threads in job configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 wangwei created SINGA-45: ---------------------------- Summary: Set openblas num threads in job configuration Key: SINGA-45 URL: https://issues.apache.org/jira/browse/SINGA-45 Project: Singa Issue Type: New Feature Reporter: wangwei SINGA uses OpenBlas to do time consuming operations like matrix multiplications. According to [OpenBlas's documentation|https://github.com/xianyi/OpenBLAS/wiki/faq#multi-threaded], if multiple worker threads are launched within one process, we should set OpenBlas to use single thread. This can be done by adding a job configuration field, e.g., openblas_num_thread, and calling openblas_set_num_threads() in the dirver (main.cc) program. If users do not set this field, SINGA should set it to 1 if there are multiple worker threads within one SINGA process. If there is only one worker thread, then let OpenBlas use as many threads (cores) as possible. In practice, better performance is achieved by launching n workers (each assigned 1/n images) than using OpenBlas with n threads. Because OpenBlas only parallelize a subset of operations. n workers can run in fully parallel. -- This message was sent by Atlassian JIRA (v6.3.4#6332)