From patchwork Sat Oct 14 19:51:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 152957 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp2637796vqb; Sat, 14 Oct 2023 12:52:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9V3OACxeYP+WqOS8U4hMczRX/aWM9i0o1CAymFZd/uHMjwf6FArv86OnJ6cyS/DOpPPuv X-Received: by 2002:a05:620a:166b:b0:76f:2707:77f8 with SMTP id d11-20020a05620a166b00b0076f270777f8mr26237524qko.46.1697313133591; Sat, 14 Oct 2023 12:52:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697313133; cv=pass; d=google.com; s=arc-20160816; b=X3b0mXmvPzX5h84HUtfBB8H/Q45HPNjwMN9Tlekc/mOF0YSdHWeeqFGgyJPwKnOBxq 26SKOzR8gMkn9KjVkJV56AVJ8YkHO37teOG/anh818DHKRp0fAuJQkzp58NBz+lAE+ay 2BN70XhLYAl4jFTtM9Ozq8ebSjuScfigiFGSQ/97c2IipuFzQkDr/wHhRYLkbK3Ufvdc nPjdYRaDxZrwEUA8o3j/asCFArdFBOi/K+IbzdKckFu4HCexJ9QIngTJ8tae4SIgFHBM z5kGDejKijWkzYxzCMlCCCbvffm0Gf12NVURZZZmsZKveI1m3cBVbr565f/IwVV9evDh IcFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:dmarc-filter:arc-filter:delivered-to; bh=BSctgrGhytwKPzVowRCejheeDJMoRnxcYjrf6RhIcz0=; fh=U/3ly3drstinH0RRQomgjIMNedf21h29sx761FLvkkk=; b=wiyfEiiSUdLit7CTvA8GYVstFXj6pmBKAfGpIaMHA94SELunDlHWrWbNAJ0qrvBG/O r9x9PKBl1ZGxg+AdPEZjWJDD5/wmBwVo7kH+N1ygaW8sR3zxgJLWgBpqEBA4iB+GgTqe nYJrbMg+kM+6uIvJ7J0g8ryP02nC4DMtkim9qA5spMRtCKyG+h1dQ+XK7RL2yOm08YjJ nnw/IyxhyUnm6WNlhxMuGojx7KiC4ctnBH7bcxwMRD1MVZCBJCWs1tXYWJXtGkZrefoV FgpYpsAqqy7uHPIP8ZdkSgGO7UhauCW0kGAssHtCYy81+y2is5fI3nW9U8+NCtxv3hXg /2DQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id br19-20020a05620a461300b0076cafcc69aesi3307932qkb.453.2023.10.14.12.52.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 12:52:13 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5EAC53857C4F for ; Sat, 14 Oct 2023 19:52:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id F080B3858D20 for ; Sat, 14 Oct 2023 19:51:49 +0000 (GMT) ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F080B3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.141.98 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697313112; cv=none; b=WKyRUAH5oU0zgOPWRlpbz+HoPO7SBiwT25QBWPyYgw5MqAQpPQAB113s9lIG7RzJuvOvNOwhe5NOYkxJ/hWsuL4OMa6mSmP5U6Mq7VlnRHjNmAhGinSoLCydA9LMVOQayCYy/IduXQ1+s8dr0HclB01q7jRUf+5m8Tex/pibnK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697313112; c=relaxed/simple; bh=zupBpoLJA3j9BIJQW8QFm06h3kRiwPMn+0I9xCUGul8=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=TJyUNj0Z+FI9EsaIHNRL4JHxwiEG/+KKODB0KcLgALD0SpI/aJlvYzijF/dd5XeLHxmUEGYhKmArlPlO5FMOW8FHAFzj/pXJohSUChinjhVRHs32jC08O2EklaggbpWXWfo6e9wwdeKDaguNAP3L+3UxgebP+dMEkYJPTDvZHvM= ARC-Authentication-Results: i=1; server2.sourceware.org DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F080B3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-CSE-ConnectionGUID: S3M6FCn7TbW4XlNGVBATXw== X-CSE-MsgGUID: y4sgRuctSES1dWXn2IOa4Q== X-IronPort-AV: E=Sophos;i="6.03,224,1694764800"; d="diff'?scan'208";a="21855195" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 14 Oct 2023 11:51:48 -0800 IronPort-SDR: wWZTZSgpc0eSNIy5HpqXzM6QN8KGUkVVV6v5jDMufxIJKGWdYiWKiH/uiqaSH0sywKy+7BQXdm SkN/879PEdGQaeePgVNewOlFElTq+RgSXymbY/vKdwfGEY9O8aKQnTbClLUIpNWLYS5hJpMgQU qsXZF1h01BFyf/jf0AIiDNF75OeJ+jU6a57yfk6CR5w3xMynMB2zrZsGImfRFZezolbeNuc/5B AkB3loAaFmxA2Ke3FbM3OPP8Z4Arcq4ANJKAYLw0CkrIogmC+qmYm4I+sEIMTJylUtk9SCoHAV OnA= Message-ID: Date: Sat, 14 Oct 2023 21:51:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches , Thomas Schwinge , Sandra Loosemore From: Tobias Burnus Subject: [patch] libgomp.texi: Improve "OpenACC Environment Variables" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779761816778781757 X-GMAIL-MSGID: 1779761816778781757 I was recently suggesting someone to use ACC_DEVICE_TYPE; I did not point to the documentation it only contains the title: https://gcc.gnu.org/onlinedocs/libgomp/ACC_005fDEVICE_005fTYPE.html Admittedly, there is also "Reference:" pointing to the OpenACC specification, but the latter just states: "The allowed values of this environment variable are implementation-defined. See the release notes for currently-supported values of this environment variable." Thus, I now added documentation for the three ACC_ env vars. I removed GCC_ACC_NOTIFY as it does not seem to exist - and it looks as if it never did ... (The Nvidia compiler seems to support ACC_NOTIFY with a similar usage as GOMP_DEBUG and GCN_DEBUG). It was added in GCC 6, which implies that it also won't be added again. (I also checked OG9 and OG13 and neither contained it; I don't know whether some older OG did.) Comments? Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 libgomp.texi: Improve "OpenACC Environment Variables" None of the ACC_* env vars was documented; in particular, the valid valids for ACC_DEVICE_TYPE found to be lacking as those are not document in the OpenACC spec. GCC_ACC_NOTIFY was removed as I find any traces of it but the addition to the documentation in commit r6-6185-gcdf6119dad04dd ("libgomp.texi: Updates for OpenACC."). It seems to be planned as GCC version of the ACC_NOTIFY env var used by another compiler for offloading debugging. libgomp/ * libgomp.tex (ACC_DEVICE_TYPE, ACC_DEVICE_NUM, ACC_PROFLIB): Actually document what the function does. (GCC_ACC_NOTIFY): Remove unused env var. diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index 526d1be2955..941525d013d 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -4989,13 +4989,11 @@ The variables @env{ACC_DEVICE_TYPE} and @env{ACC_DEVICE_NUM} are defined by section 4 of the OpenACC specification in version 2.0. The variable @env{ACC_PROFLIB} is defined by section 4 of the OpenACC specification in version 2.6. -The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes. @menu * ACC_DEVICE_TYPE:: * ACC_DEVICE_NUM:: * ACC_PROFLIB:: -* GCC_ACC_NOTIFY:: @end menu @@ -5003,6 +5001,17 @@ The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes. @node ACC_DEVICE_TYPE @section @code{ACC_DEVICE_TYPE} @table @asis +@item @emph{Description}: +Control the default device type to use when executing compute regions. +If unset, the code can be run on any device type, favoring a non-host +device type. + +Supported value in GCC (if compiled in) are +@itemize +@item @code{host} +@item @code{nvidia} +@item @code{radeon} +@end itemize @item @emph{Reference}: @uref{https://www.openacc.org, OpenACC specification v2.6}, section 4.1. @@ -5013,6 +5022,10 @@ The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes. @node ACC_DEVICE_NUM @section @code{ACC_DEVICE_NUM} @table @asis +@item @emph{Description}: +Control which device, identified by device number, is the default device. +The number must be a nonnegative integer number less that the number of +devices. If unset, device number zero is used. @item @emph{Reference}: @uref{https://www.openacc.org, OpenACC specification v2.6}, section 4.2. @@ -5023,6 +5036,11 @@ The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes. @node ACC_PROFLIB @section @code{ACC_PROFLIB} @table @asis +@item @emph{Description}: +Semicolon separated list of dynamic libraries to be loaded as profiling library. +The library file is found as described by the documentation of @code{dlopen} of +your operating system. Each library must implement at least the routine +@code{acc_register_library} routine. @item @emph{See also}: @ref{acc_register_library}, @ref{OpenACC Profiling Interface} @@ -5033,15 +5051,6 @@ The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes. -@node GCC_ACC_NOTIFY -@section @code{GCC_ACC_NOTIFY} -@table @asis -@item @emph{Description}: -Print debug information pertaining to the accelerator. -@end table - - - @c --------------------------------------------------------------------- @c CUDA Streams Usage @c ---------------------------------------------------------------------