From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 570703851ABD for ; Fri, 24 Mar 2023 16:30:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 570703851ABD 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-IronPort-AV: E=Sophos;i="5.98,288,1673942400"; d="scan'208,223";a="281175" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 24 Mar 2023 08:30:39 -0800 IronPort-SDR: trbHGLNfUvolnXEO8k40Om8NKWadb19QUABp8joEkTKYgI2mjmZEGkbalObPHfj6AHs7SmKkjT K21JhxERY3qJiFPncMw0PtX64HPK+DAN9uOjn1ONL5qktOTPD/aSHqjMU/Z9UkJV+XvkY667H4 nHRD7NAypwGhBuSbfRR9EKseJnz9HHDDm/lmrTANIEd6vctjGrF3vo1Mldb8z1MkPasasPGNPV Zuuhz26bSsEQo1IwlXt2IYgYMU7qoS1mbRC4cB2/cWbqdUykvefJ9KCZrfkLsJNr/bz4X1CNo2 jYg= From: Thomas Schwinge To: CC: Andrew Stubbs Subject: Re: [OG12][committed] amdgcn: OpenMP low-latency allocator In-Reply-To: <5eaeddf5-317a-4574-868b-87999bb6af33@codesourcery.com> References: <5eaeddf5-317a-4574-868b-87999bb6af33@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Fri, 24 Mar 2023 17:30:33 +0100 Message-ID: <874jqa9knq.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_LOTSOFHASH,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 List-Id: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2023-02-16T18:06:41+0000, Andrew Stubbs wrote: > 2. 230216-amd-low-lat.patch > > Allocate the memory, adjust the default address space, and hook up the > allocator. Like done for nvptx in og12 commit 23f52e49368d7b26a1b1a72d6bb903d31666e961 "Miscellaneous clean-up re OpenMP 'ompx_unified_shared_mem_space', 'ompx_ho= st_mem_space'", I've now pushed the corresponding GCN 'ompx_host_mem_space' thing to devel/omp/gcc-12 branch in commit b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a "Miscellaneous clean-up re OpenMP 'ompx_host_mem_space'", see attached. Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Miscellaneous-clean-up-re-OpenMP-ompx_host_mem_space.patch" >From b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 17 Feb 2023 14:13:15 +0100 Subject: [PATCH] Miscellaneous clean-up re OpenMP 'ompx_host_mem_space' Like done for nvptx in og12 commit 23f52e49368d7b26a1b1a72d6bb903d31666e961 "Miscellaneous clean-up re OpenMP 'ompx_unified_shared_mem_space', 'ompx_host_mem_space'". Clean-up for og12 commit c77c45a641fedc3fe770e909cc010fb1735bdbbd "amdgcn, libgomp: low-latency allocator". No functional change. libgomp/ * config/gcn/allocator.c (gcn_memspace_free): Explicitly handle 'memspace == ompx_host_mem_space'. --- libgomp/ChangeLog.omp | 3 +++ libgomp/config/gcn/allocator.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 63d1f563d5d..ef957e3d2d8 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,8 @@ 2023-03-24 Thomas Schwinge + * config/gcn/allocator.c (gcn_memspace_free): Explicitly handle + 'memspace == ompx_host_mem_space'. + Backported from master: 2023-03-24 Thomas Schwinge diff --git a/libgomp/config/gcn/allocator.c b/libgomp/config/gcn/allocator.c index 001de89ffe0..e9980f6f98e 100644 --- a/libgomp/config/gcn/allocator.c +++ b/libgomp/config/gcn/allocator.c @@ -36,6 +36,7 @@ when the memspace access trait is set accordingly. */ #include "libgomp.h" +#include #include #define BASIC_ALLOC_PREFIX __gcn_lowlat @@ -86,6 +87,9 @@ gcn_memspace_free (omp_memspace_handle_t memspace, void *addr, size_t size) __gcn_lowlat_free (shared_pool, addr, size); } + else if (memspace == ompx_host_mem_space) + /* Just verify what all allocator functions return. */ + assert (addr == NULL); else free (addr); } -- 2.25.1 --=-=-=--