From dev-return-5398-archive-asf-public=cust-asf.ponee.io@singa.apache.org Wed May 20 08:59:04 2020 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 678B7180637 for ; Wed, 20 May 2020 10:59:04 +0200 (CEST) Received: (qmail 27800 invoked by uid 500); 20 May 2020 08:59:03 -0000 Mailing-List: contact dev-help@singa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.apache.org Delivered-To: mailing list dev@singa.apache.org Received: (qmail 27790 invoked by uid 99); 20 May 2020 08:59:03 -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; Wed, 20 May 2020 08:59:03 +0000 From: =?utf-8?q?GitBox?= To: dev@singa.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bsinga=5D_nudles_commented_on_a_change_in_pull_requ?= =?utf-8?q?est_=23694=3A_SINGA-510_Add_Time_Profiling_for_Single_GPU?= Message-ID: <158996514360.19379.2348005716562825755.asfpy@gitbox.apache.org> Date: Wed, 20 May 2020 08:59:03 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: nudles commented on a change in pull request #694: URL: https://github.com/apache/singa/pull/694#discussion_r427851193 ########## File path: include/singa/core/device.h ########## @@ -51,6 +51,17 @@ using std::vector; namespace singa { +/// Method used by time profiling +/// ProfilingMode == 0 (default) -> Chrono +/// ProfilingMode == 1 -> Event (e.g. cudaEvent) +enum ProfilingMode { useChrono, useEvent }; + +/// Verbosity of the time profiling function: +/// Verbosity == 0 (default) -> no logging +/// Verbosity == 1 -> display forward and backward propagation time +/// Verbosity == 2 -> display each operation time (OP_ID, op name, time) +enum Verbosity { disableLog, forwardBackwardTime, eachOperation }; Review comment: I think verbosity is typically set as a number... We can refer to other project's code on how to set verbosity, giving it a name or just using int. logging has INFO, WARN, ERROR, which are self-explainable. ########## File path: include/singa/core/device.h ########## @@ -51,6 +51,17 @@ using std::vector; namespace singa { +/// Method used by time profiling +/// ProfilingMode == 0 (default) -> Chrono +/// ProfilingMode == 1 -> Event (e.g. cudaEvent) +enum ProfilingMode { useChrono, useEvent }; Review comment: I think chorno is only applicable for measuring cpu time and cudaevent is for measuring gpu time. e.g., we cannot use cudaEvent if we are running on cpu. ---------------------------------------------------------------- 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: users@infra.apache.org