From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6646 invoked by alias); 30 Jan 2020 16:46:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 6607 invoked by uid 89); 30 Jan 2020 16:45:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*MI:sk:874kwdl, H*i:sk:874kwdl, H*f:sk:874kwdl, H*M:c58b X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Jan 2020 16:45:57 +0000 IronPort-SDR: +aQbr9oLndInRVAlsZLx2U8Xyo/2gvfTFr9Xa8v2A606QutWY3GD7CKrwCJvhheHPbifFWvvg2 wlTI2xWiyqEGox7sZuTtk3ZpaaxYCoTl1BVAXTaV46YIsNAbmx/DoVWQ7bth2ECJs16U/sqWJY LORTjnb78KudjVW6EApuPNC9rW9xrZZyshgGqaLf9oU/LmKG6Y1tcb6CJmCRBHtWDpTxxGMnCS 0e0+BGLnRRVkGNmWuNi0Boox7Hl+X80HVsTld2hMK26QZoEPRRB4KSJ8xi/K9CSRU6kpgNszLV xkk= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 30 Jan 2020 08:45:55 -0800 IronPort-SDR: 7R3DW8/QsflCFhffSz7g/TioQ6gONhnvdS4+nfM5pOWYrtJ526nb9lNI3s9s/+zuZtdWVuYpbx LPOIFlL4WmHg== Subject: Re: [PATCH] Add OpenACC acc_get_property support for AMD GCN To: Thomas Schwinge , Frederik Harwath CC: Jakub Jelinek , References: <0f59690f-5247-9b6e-169a-9a6ef16c41e1@codesourcery.com> <472b4749-7752-1527-c59c-1ab348854f32@codesourcery.com> <874kwdlyf7.fsf@euler.schwinge.homeip.net> From: Andrew Stubbs Message-ID: Date: Thu, 30 Jan 2020 16:54:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <874kwdlyf7.fsf@euler.schwinge.homeip.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-Path: ams@codesourcery.com X-SW-Source: 2020-01/txt/msg02023.txt.bz2 On 30/01/2020 16:08, Thomas Schwinge wrote: > Hi! > > Andrew and Frederik, thanks for your emails reminding/educating me about > 'snprintf' as well as this HSA fixed-size buffer API. There doesn't > happen to be something available in the HSA API available so that we > could use 'sizeof [something]' instead of hard-coding '64' etc.? No, not at present; hsa_agent_get_info_fn is a somewhat generic interface that takes an enum and returns a void*. The return type is written in the documentation: https://rocm-documentation.readthedocs.io/en/latest/ROCm_API_References/ROCr-API.html#rocr-api However, we don't use the official ROCm header files, because dependencies and licenses, so we could invent our own typedefs in hsa.h, if we chose. I don't see that doing so would be worth the effort now, or maintenance burden later. I'll let Frederik explain his implementation decisions. Andrew