[PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-10-08 Thread Kwok Cheung Yeung
r mainline? Thanks KwokFrom 46129c254990a9fff4b6d8512f04ad8fa7d61f0e Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Sun, 8 Oct 2023 13:50:25 +0100 Subject: [PATCH] openmp: Add support for the 'indirect' clause in C/C++ This adds support for the 'indirect' clause in the 'declare target' directive

[og12] [committed] Fix bootstrap build of OG12

2022-06-30 Thread Kwok Cheung Yeung
ompatible with the " + "selected %<-foffload-memory%> option"); flag_offload_memory = OFFLOAD_MEMORY_UNIFIED; } else if (!strcmp (p, "dynamic_allocators")) -- 2.25.1 From e9ee746093bd989c33685e3197c75b

[og12] [committed] Port remaining OG11 patches

2022-07-01 Thread Kwok Cheung Yeung
(hsaco_attr_type: ... this.) + * config/gcn/mkoffload.c (SET_XNACK_ANY): New macro. + (TEST_XNACK): Delete. + (TEST_XNACK_ANY): New macro. + (TEST_XNACK_ON): New macro. + (main): Support the new -mxnack=on/off/any syntax. + 2022-06-30 Kwok Cheung Yeung

Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-11-03 Thread Kwok Cheung Yeung
ending successful testing (still in progress)? Thanks Kwok Thanks, 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:

Re: [OG12][committed] openmp: Add support for the 'present' modifier

2023-02-14 Thread Kwok Cheung Yeung
Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 14 Feb 2023 21:24:19 + Subject: [PATCH] openmp: Add support for 'present' modifier in the Fortran parse tree dump 2023-02-14 Kwok Cheung Yeung gcc/fortran/ * dump-parse-tree.cc (show_omp_namelist): Display

[PATCHv2] openmp: Add support for 'present' modifier

2023-02-17 Thread Kwok Cheung Yeung
- The Fortran parse tree dump now shows clauses with 'present' applied. - The reordering of OpenMP clauses has been moved to gimplify_scan_omp_clauses, where the other clause reordering rules are applied. Thanks KwokFrom 24b6225578bb08bbd745d6ec653aab60802dd220 Mon Sep 17 00:00:00 2001

[PATCH] amdgcn: Enable SIMD vectorization of math functions

2023-02-28 Thread Kwok Cheung Yeung
st for now - it is still useful to check that calls to the correct functions are being made. The runtime correctness is still covered by the libgomp test. Okay for trunk? Thanks Kwok From 69d13dc898ff7c70e80299a92dc895a89a9e679b Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 28 F

Re: [PATCH] amdgcn: Enable SIMD vectorization of math functions

2023-03-02 Thread Kwok Cheung Yeung
Hello I've made the suggested changes. Should I hold off on committing this until GCC 13 has been branched off? Kwok On 01/03/2023 10:01 am, Andrew Stubbs wrote: On 28/02/2023 23:01, Kwok Cheung Yeung wrote: Hello This patch implements the TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUN

[PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-01-21 Thread Kwok Cheung Yeung
patch okay for trunk? Thanks Kwok From 12cc24c937e9294d5616dd0cd9a754c02ffb26fa Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 21 Jan 2021 05:38:47 -0800 Subject: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738] This adds support for the task detach clause to taskwa

Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-01-21 Thread Kwok Cheung Yeung
On 21/01/2021 7:33 pm, Kwok Cheung Yeung wrote: With Nvidia and GCN offloading though, task-detach-6 hangs... I _think_ the reason why it 'worked' before was because the taskwait allowed tasks with detach clauses to always complete immediately after execution. Since that backdoor

[OG10][committed] Backport patches for OpenMP task detach support

2021-01-22 Thread Kwok Cheung Yeung
I have backported a number of patches from mainline to the devel/omp/gcc-10 branch: * openmp: Add support for the OpenMP 5.0 task detach clause (de460a5faff80a2338ccd46f249c964fa34b4c16) * libgomp: Don't access gomp_sem_t as int using atomics unconditionally (2b93ffc7219aa53815ece2adb21f56dd

[PATCH] libgomp: Add documentation for omp_fulfill_event

2021-01-25 Thread Kwok Cheung Yeung
Hello I forgot to update the libgomp documentation to document the new omp_fulfill_event runtime routine introduced by task detach support. Is this patch okay for trunk? Thanks Kwok From efeaac839879bc30e0e7e129ca43381192a6f109 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 25

[OG10] [committed] Backport patches for non-rectangular loop collapse

2021-02-09 Thread Kwok Cheung Yeung
Hello I have backported the following patches for supporting non-rectangular loop collapse from mainline to the devel/omp/gcc-10 branch: 7bfdb5a1c694cb9006e0478941e4443b230f5b98 openmp: Fix ICE on non-rectangular loop with known 0 iterations 88528328ea560230f728af97110e89396c8267d2 openmp: Im

[WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-19 Thread Kwok Cheung Yeung
ding to GCN, but with offloading to Nvidia, task-detach-6.* hangs consistently but everything else passes (probably because of the missing gomp_team_barrier_done?). Kwok From 31a5c736910036364fd1f0f3cf7ac28437864a27 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 21 Jan 2021 05:38:

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-23 Thread Kwok Cheung Yeung
On 19/02/2021 7:12 pm, Kwok Cheung Yeung wrote: I have included the current state of my patch. All task-detach-* tests pass when executed without offloading or with offloading to GCN, but with offloading to Nvidia, task-detach-6.* hangs consistently but everything else passes (probably because

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-24 Thread Kwok Cheung Yeung
team. If I omit the 'omp parallel' (to try to get an undeferred task), GCC refuses to compile (only 'distribute', 'parallel' or 'loop' regions are allowed to be strictly nested inside 'teams' region). And you can't nest 'omp teams'

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-25 Thread Kwok Cheung Yeung
comment. Otherwise LGTM. I will get this committed later if the regression tests finish with no surprises. Thank you for your time in reviewing this patch! Kwok From 462c86549de28f28d5a71e4a7e83e2c17fd19c17 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 21 Jan 2021 05:38:47 -0800 Su

[PATCH] [og10] openmp: Scale precision of collapsed iteration variable

2021-03-01 Thread Kwok Cheung Yeung
b7a1575920c8de17359b2dfcad5404a112 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 1 Mar 2021 14:15:30 -0800 Subject: [PATCH] openmp: Scale type precision of collapsed iterator variable This sets the type precision of the collapsed iterator variable to the sum of the precision of the

[PATCH] [OG10] Fix warning messages in privatized-ref-[23].C testcases

2020-09-16 Thread Kwok Cheung Yeung
: Kwok Cheung Yeung Date: Wed Sep 16 03:18:54 2020 -0700 Fix warning messages in libgomp.oacc-c++/privatized-ref-[23].C testcases More workers are requested than are supported, resulting in warning messages as the number of workers is overridden. 2020-09-16 Kwok Cheung

[PATCH] [OG10] Xfail libgomp.oacc-fortran/privatized-ref-2.f90 when offloading to nvptx

2020-09-16 Thread Kwok Cheung Yeung
Yeung Date: Wed Sep 16 10:19:35 2020 -0700 XFAIL libgomp.oacc-fortran/privatized-ref-2.f90 on nvptx The testcase uses alloca, which is not currently supported on nvptx (see PR65181). 2020-09-16 Kwok Cheung Yeung libgomp/ * testsuite/libgomp.oacc

[PATCH] [OG10] Fix warning messages in privatized-ref-1.f95 testcase

2020-09-17 Thread Kwok Cheung Yeung
The libgomp.oacc-fortran/privatized-ref-1.f95 also has the same issue, and has been fixed in the same way. Kwok On 16/09/2020 11:33 am, Kwok Cheung Yeung wrote: Hello The libgomp.oacc-c++/privatized-ref-[23].C testcases request 64 workers in a parallel section, but Nvidia only supports a

[PATCH][v2] openmp, fortran: Check that the type of an event handle in a detach clause is suitable [PR104131]

2022-03-02 Thread Kwok Cheung Yeung
bly be treated separatedly. I don’t know how difficult the bullet 2 above would be, but bullet 1 and 3 seem quite doable.From 3ed6eb1e38ad2a25c6eca18f9ff4d05d3f227db3 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 2 Mar 2022 17:09:45 + Subject: [PATCH] openmp, fortran: Check that

[PATCH] openmp: Metadirective patch fixes

2022-01-24 Thread Kwok Cheung Yeung
n't matter much, as GCC readily eliminates the resulting 'if ()' statements via constant folding. These fixes should be merged into the original metadirective patches. Thanks KwokFrom 77f419aef8a608440789b0ebb4a08f11d69f00e2 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date:

[PATCH] openmp: Add support for target_device selector set in metadirectives

2022-01-24 Thread Kwok Cheung Yeung
GCC 12 is released)? Thanks KwokFrom 2d2f00947783e1ecdf54943d9c499015ce61d267 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 24 Nov 2021 02:51:28 -0800 Subject: [PATCH] openmp: Add support for 'target_device' context selector set 2022-01-18 Kwok Cheung Yeung gc

[OG11][committed] OpenMP metadirective support

2022-01-25 Thread Kwok Cheung Yeung
Hello I have backported and committed my metadirective patches onto the current OpenMP development branch (devel/omp/gcc-11). These are: f464df13a44b9814341659be631f051377a2ce25 openmp: Add C support for parsing metadirectives a238b6934b62ce3e8342047e41840c804d83b59d openmp: Add middle-end su

Re: [PATCH] openmp: Add support for target_device selector set in metadirectives

2022-01-26 Thread Kwok Cheung Yeung
Hello Just noticed a bug in the ISA checking in the nvptx plugin - the minor version should only be compared if the major version is equal, otherwise it would reject an isa of sm_35 if the card is capable of supporting sm_52, for example. This patch fixes the issue. Thanks Kwokdiff --git a/

[PATCH] openmp: Add warning when functions containing metadirectives with 'construct={target}' called directly

2022-01-28 Thread Kwok Cheung Yeung
irective patches are done)? Thanks Kwok On 26/07/2021 10:23 pm, Jakub Jelinek wrote: On Mon, Jul 26, 2021 at 10:19:35PM +0100, Kwok Cheung Yeung wrote: Yes, that is a target variant, but I'm pretty sure we've decided that the target construct added for declare target is actual

[OG11][committed] openmp: Add warning when functions containing metadirectives with 'construct={target}' called directly

2022-01-28 Thread Kwok Cheung Yeung
Hello I have backported and committed the patch 'openmp: Add warning when functions containing metadirectives with 'construct={target}' called directly' to the devel/omp/gcc-11 development branch: d6d82af7918 openmp: Add warning when functions containing metadirectives with 'construct={targe

Re: [OG11][committed] OpenMP metadirective support

2022-01-31 Thread Kwok Cheung Yeung
because the expected wording of the error message has changed. This fix is already in the version of the patch posted at: https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589191.html KwokFrom 23dd64c4715b2df2181aaf995e3040d54edba129 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon,

Re: [PATCH 6/7] openmp, fortran: Add Fortran support for parsing metadirectives

2022-02-14 Thread Kwok Cheung Yeung
ost metadirective state to that of 'program P' in order to find the proper end type, and not just one level as it currently does. Thanks KwokFrom 5a7b109a014422a5b43e43669df1dc0d59e830cf Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 11 Feb 2022 11:20:18 + Subject: [PA

Re: [PATCH 6/7] openmp, fortran: Add Fortran support for parsing metadirectives

2022-02-14 Thread Kwok Cheung Yeung
adirective (i.e. just '!$omp metadirective' with nothing else) is fixed. Thanks KwokFrom 153b8dbd19cf90b1869be7f409d55d1ab5ba81d5 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 11 Feb 2022 15:42:50 + Subject: [PATCH 2/2] openmp: More Fortran front-end fixes for metadir

[OG11][committed] Fortran metadirective fixes

2022-02-14 Thread Kwok Cheung Yeung
Hello I have backported and committed the recent two fixes for Fortran metadirective handling onto the devel/omp/gcc-11 development branch: 38ed9d83b893df0bbd098c7b44dbbeb56ed7dd1c openmp: Eliminate non-matching metadirective variants early in Fortran front-end (https://gcc.gnu.org/pipermai

[PATCH] openmp: Improve handling of nested OpenMP metadirectives in C and C++ (was: Re: [PATCH 1/7] openmp: Add C support for parsing metadirectives)

2022-02-18 Thread Kwok Cheung Yeung
rectives. KwokFrom a9e4936b8476b97f11bb81b416ef3d28fa60cd37 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 18 Feb 2022 19:00:57 + Subject: [PATCH] openmp: Improve handling of nested OpenMP metadirectives in C and C++ This patch fixes a misparsing issue when encountering code

[og11][committed] openmp: Improve handling of nested OpenMP metadirectives in C and C++

2022-02-18 Thread Kwok Cheung Yeung
This patch has been committed to the devel/omp/gcc-11 development branch: 249df772b70f7b9f50f68030d4ea9c25624cc578 openmp: Improve handling of nested OpenMP metadirectives in C and C++ Kwok

[PATCH] openmp, fortran: Check that event handles passed to detach clauses are not arrays [PR104131]

2022-02-28 Thread Kwok Cheung Yeung
event handle during parsing if it is any type of array, thereby preventing the situation leading to an ICE in the first place. Okay for trunk? Thanks KwokFrom 8ed3b8bd793298f94bdefbdff32f91eaea1a9d70 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 28 Feb 2022 12:34:22 + Subject

Re: [PATCH] openmp, fortran: Check that event handles passed to detach clauses are not arrays [PR104131]

2022-02-28 Thread Kwok Cheung Yeung
On 28/02/2022 2:07 pm, Jakub Jelinek wrote: On Mon, Feb 28, 2022 at 02:01:03PM +, Kwok Cheung Yeung wrote: diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index 19142c4d8d0..50a1c476009 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -531,9 +531,10

Re: [PATCH] openmp, fortran: Check that event handles passed to detach clauses are not arrays [PR104131]

2022-02-28 Thread Kwok Cheung Yeung
On 28/02/2022 5:37 pm, Jakub Jelinek wrote: On Mon, Feb 28, 2022 at 06:33:15PM +0100, Mikael Morin wrote: It is true that the spots I saw in fortran/openmp.cc that test rank look like: if (!gfc_resolve_expr (el->expr) || el->expr->ts.type != BT_INTEGER || el->expr->rank !

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-12-10 Thread Kwok Cheung Yeung
Hello It has been several months since I posted my WIP patch, and my current patch set (which I will post separately) has evolved considerably since then. I have added C++ and Fortran support, as well as dynamic selectors from the OpenMP 5.1 spec (currently only the 'user={condition()}' selec

[PATCH 0/7] openmp: OpenMP metadirectives support

2021-12-10 Thread Kwok Cheung Yeung
Hello This is my current patchset for OpenMP metadirectives support. It aims to implement the specification from OpenMP 5.1, with dynamic selector support (though currently only the dynamic user selector set is supported), and supports the C, C++ and Fortran front ends. The patch has been bo

[PATCH 1/7] openmp: Add C support for parsing metadirectives

2021-12-10 Thread Kwok Cheung Yeung
x27;end ' form (apart from the 'nothing' directive), and in C/C++, the only directive that we support with an end form is 'declare target', which we currently forbid since it is declarative. KwokFrom dc88559b0295104472a0cbf79de03b0549bd35f5 Mon Sep 17 00:00:00 2001 From:

[PATCH 2/7] openmp: Add middle-end support for metadirectives

2021-12-10 Thread Kwok Cheung Yeung
to pass through the middle-end. GCC will emit an ICE if it makes it through to the back-end though, as the metadirective is supposed to be eliminated before it gets that far. KwokFrom 1a2fcbb2191fd1dd694ea5730e54fab19d6465b4 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 202

[PATCH 3/7] openmp: Add support for resolving metadirectives during parsing and Gimplification

2021-12-10 Thread Kwok Cheung Yeung
65ee7342256db3c81cc6741ce2c96e36dd4a9ca6 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 22:49:23 + Subject: [PATCH 3/7] openmp: Add support for resolving metadirectives during parsing and Gimplification This adds support for resolving metadirectives according to the OpenMP 5.1

[PATCH 4/7] openmp: Add support for streaming metadirectives and resolving them after LTO

2021-12-10 Thread Kwok Cheung Yeung
85826d05e029571fd003dd629aa04ce3e17d9c71 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 22:56:07 + Subject: [PATCH 4/7] openmp: Add support for streaming metadirectives and resolving them after LTO This patch adds support for streaming metadirective Gimple statements during

[PATCH 5/7] openmp: Add C++ support for parsing metadirectives

2021-12-10 Thread Kwok Cheung Yeung
This patch adds metadirective parsing support to the C++ parser. This is basically just a straight port of the C code to the C++ front end. KwokFrom e9bb138d4c3f560e48e408facce2361533685a98 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 22:58:01 + Subject: [PATCH 5

[PATCH 6/7] openmp, fortran: Add Fortran support for parsing metadirectives

2021-12-10 Thread Kwok Cheung Yeung
n internal implementation detail not visible to end users. KwokFrom eed8a06fca397edd5fb451f08c8b1a6f7d67951a Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 22:59:36 + Subject: [PATCH 6/7] openmp, fortran: Add Fortran support for parsing metadirectives This adds s

[PATCH 7/7] openmp: Add testcases for metadirectives

2021-12-10 Thread Kwok Cheung Yeung
This adds testcases for metadirectives. KwokFrom d3f80b603298fb2f3501a28b888acfdbc02a64e7 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 7 Dec 2021 11:25:33 + Subject: [PATCH 7/7] openmp: Add testcases for metadirectives 2021-12-10 Kwok Cheung Yeung gcc/testsuite

[OG12] [committed] amdgcn: Enable SIMD vectorization of math library functions

2022-11-01 Thread Kwok Cheung Yeung
Hello I have committed the following patches onto the devel/omp/gcc-12 development branch: 863579c4e30 amdgcn: Enable SIMD vectorization of math functions bd9a6106b95 amdgcn: Add SIMD versions of math routines to libgcc d3a2a1cc424 amdgcn: Add builtins for vector floor/floorf a3c04a367a9 amdgc

[PATCH] amdgcn: Fix instruction generation for exp2 and log2 operations

2022-11-03 Thread Kwok Cheung Yeung
kFrom c0e74e01743cd3a3e0dcb2a071396e3a5751ff4c Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 3 Nov 2022 17:19:11 + Subject: [PATCH] amdgcn: Fix instruction generation for exp2 and log2 operations The GCN instructions for the exp2 and log2 operations are v_exp_* and v

[PATCH] amdgcn: Add support for additional natively supported floating-point operations

2022-09-08 Thread Kwok Cheung Yeung
7 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 8 Sep 2022 17:37:26 + Subject: [PATCH] amdgcn: Add support for additional natively supported floating-point operations This adds support for the following natively supported floating-point operations, in scalar and vectorized modes: floor,

[PATCH] Support multiple registers for the frame pointer

2019-11-02 Thread Kwok Cheung Yeung
this issue as it can affect pretty much everything not using -fomit-frame-pointer on AMD GCN. Okay for trunk? Kwok Yeung Add support for using multiple registers to hold the frame pointer 2019-11-02 Kwok Cheung Yeung gcc/ * ira.c (setup_alloc_regs): Setup

Re: [PATCH] Support multiple registers for the frame pointer

2019-11-05 Thread Kwok Cheung Yeung
Hello On 04/11/2019 04:22 pm, Georg-Johann Lay wrote: > The avr port already uses 2 hard-reg frame pointer ever since... > > Does this patch has an impact on the avr port and its handling of > the frame pointer? I am not familiar with the AVR port, but looking at the source, it looks like it pr

Re: [PATCH] Support multiple registers for the frame pointer

2019-11-06 Thread Kwok Cheung Yeung
On 04/11/2019 08:02 pm, Dimitar Dimitrov wrote: On Sat, 2 Nov 2019, 19:28:38 EET Kwok Cheung Yeung wrote: diff --git a/gcc/ira.c b/gcc/ira.c index 9f8da67..25e9359 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -515,7 +515,13 @@ setup_alloc_regs (bool use_hard_frame_p) #endif

[PATCH] [LRA] Do not use eliminable registers for spilling

2019-11-07 Thread Kwok Cheung Yeung
ng [LRA] Do not use eliminable registers for spilling 2019-11-07 Kwok Cheung Yeung gcc/ * lra-spills.c (assign_spill_hard_regs): Do not spill into registers in eliminable_regset. diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c index 0068e52..54f76cc 100644 --- a

Re: deprecations in OpenMP 5.0

2020-11-04 Thread Kwok Cheung Yeung
On 28/10/2020 4:06 pm, Jakub Jelinek wrote: On Wed, Oct 28, 2020 at 03:41:25PM +, Kwok Cheung Yeung wrote: What if we made the definition of __GOMP_DEPRECATED in the original patch conditional on the current value of __OPENMP__? i.e. Something like: +#if defined(__GNUC__) && __

Re: deprecations in OpenMP 5.0

2020-11-05 Thread Kwok Cheung Yeung
he C attribute. Kwok commit a944f2ab445bb226f65239429d13efdf69a98e4b Author: Kwok Cheung Yeung Date: Thu Nov 5 10:11:23 2020 -0800 openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 Ulrich Drepper Kwok Cheung Yeung libgomp/ * Makefile.am (%.mod): Add -cpp

[PATCH] openmp: Retire nest-var ICV

2020-11-06 Thread Kwok Cheung Yeung
is testing per data environment ICVs. Bootstrapped on x86_64 with no offloading, and libgomp testing carried out with nvptx offloading with no regressions. Okay for trunk? Thanks Kwok commit aad8afea37b33b4d5836b2b64be8f4dab6d74509 Author: Kwok Cheung Yeung Date: Wed Nov 4 15:34:12 2020 -0

Re: [PATCH] openmp: Retire nest-var ICV

2020-11-09 Thread Kwok Cheung Yeung
On 06/11/2020 8:33 pm, Tobias Burnus wrote: Hello Kwok, hi Jakub, On 06.11.20 21:13, Kwok Cheung Yeung wrote: In addition to deprecating the omp_(get|set)_nested() functions and OMP_NESTED environment variable, OpenMP 5.0 also removes the nest-var ICV altogether, defining it in terms of the

[PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2020-11-11 Thread Kwok Cheung Yeung
ementation? Thanks Kwok commit 4c3926d9abb1a7e6089a9098e2099e2d574ebfec Author: Kwok Cheung Yeung Date: Tue Nov 3 03:06:26 2020 -0800 openmp: Add support for the OpenMP 5.0 task detach clause 2020-11-11 Kwok Cheung Yeung gcc/ * builtin-types.def (BT_PTR_SIZED

Re: [PATCH] openmp: Retire nest-var ICV

2020-11-12 Thread Kwok Cheung Yeung
hanged. Is this version okay for trunk? Bootstrapped on x86_64 and libgomp tested with no regressions with nvptx offloading. Thanks Kwok commit bcaa3dbf1f130e3a2c7e6033a10be3f61221a951 Author: Kwok Cheung Yeung Date: Thu Nov 12 13:42:28 2020 -0800 openmp: Retire nest-var ICV for OpenMP 5.

[committed] [OG10] Backport OpenMP 5.0 features from master

2020-11-13 Thread Kwok Cheung Yeung
Hello I have backported a couple of patches related to OpenMP 5.0 features from master to the devel/omp/gcc-10 branch. These are: 8949b985dbaf07d433bd57d2883e1e5414f20e75: openmp: Add support for the omp_get_supported_active_levels runtime library routine 445567b22a3c535be0b1861b393e9a0b050

Re: [PATCH] Allow entry point markers without debug support in accelerator compiler

2020-01-09 Thread Kwok Cheung Yeung
ion from ever reaching the assert. I have rerun the libgomp tests on AMD GCN with no regressions. Okay for trunk? Thanks Kwok 2020-01-09 Kwok Cheung Yeung gcc/ * lto-streamer-in.c (input_function): Remove streamed-in inline debug markers if debug_inline_points

[PATCH] [amdgcn] Remove dependency on stdint.h in libgcc

2020-01-10 Thread Kwok Cheung Yeung
replacing uintptr_t with __UINTPTR_TYPE__, which is a predefined macro in the C preprocessor. Okay for trunk? Kwok 2020-01-10 Kwok Cheung Yeung libgcc/ * config/gcn/atomic.c: Remove include of stdint.h. (__sync_val_compare_and_swap_##SIZE): Replace uintptr_t with

[PATCH] [amdgcn] Scale number of threads/workers with VGPR usage

2020-01-31 Thread Kwok Cheung Yeung
The GCN architecture has 4 SIMD units per compute unit, with 256 VGPRs per SIMD unit. OpenMP threads or OpenACC workers must be distributed across the SIMD units, with each thread/worker fitting entirely within a single SIMD unit. VGPRs are shared by the kernels running in a SIMD unit, so we can

[PATCH] [libgomp, amdgcn] Fix Fortran linker errors on AMD GCN

2019-12-06 Thread Kwok Cheung Yeung
alternative definitions in the mingw32, bsd, linux, posix and rtems subdirectories of libgomp/config/. Tested on an x86_64 host with both NVPTX and GCN offloading. Okay to commit to trunk? Kwok 2019-12-06 Kwok Cheung Yeung libgomp/ * config/accel/proc.c (omp_get_num_procs

[PATCH] Allow entry point markers without debug support in accelerator compiler

2019-12-06 Thread Kwok Cheung Yeung
fire where processed by the accelerator compiler. This is fixed by allowing the markers to be ignored in LTO mode only. 2019-12-06 Kwok Cheung Yeung gcc/ * dwarf2out.c (dwarf2out_inline_entry): Return early if in LTO and debug_inline_points not set. --- gcc/dwarf

[PATCH] [amdgcn] Add support for sub-word sync_compare_and_swap operations

2020-01-08 Thread Kwok Cheung Yeung
the operation is unsuccessful due to a part of the word that is not the target subword changing values since the last read, then it must try again using the updated word. Okay for trunk? Kwok 2020-01-08 Kwok Cheung Yeung libgcc/ * config/gcn/atomic.c: New. * config

Re: [PATCH] [amdgcn] Add support for sub-word sync_compare_and_swap operations

2020-01-08 Thread Kwok Cheung Yeung
On 08/01/2020 11:42 am, Andrew Stubbs wrote: On 08/01/2020 11:07, Kwok Cheung Yeung wrote: +#define __sync_subword_compare_and_swap(type, size)    \ Macro parameters are conventionally upper case. Fixed. I upper-cased the macro name as well

[COMMIT] openmp: Mark declare variant directive as supported in Fortran

2021-10-14 Thread Kwok Cheung Yeung
From: Kwok Cheung Yeung Date: Thu, 14 Oct 2021 09:29:13 -0700 Subject: [PATCH] openmp: Mark declare variant directive in documentation as supported in Fortran 2021-10-14 Kwok Cheung Yeung libgomp/ * libgomp.texi (OpenMP 5.0): Update entry for declare variant directive. --

Re: [PATCH] openmp, fortran: Add support for declare variant in Fortran

2021-10-18 Thread Kwok Cheung Yeung
From 38733234024697d2144613c4a992e970f40afad8 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 18 Oct 2021 13:56:59 -0700 Subject: [PATCH] openmp: Add additional tests for declare variant in Fortran Add tests to check that explicitly specifying the containing procedure as the base name for declare va

[WIP, OpenMP] OpenMP metadirectives support

2021-07-09 Thread Kwok Cheung Yeung
Hello This is a WIP implementation of metadirectives as defined in the OpenMP 5.0 spec. I intend to add support for metadirectives as specified in OpenMP 5.1 later (where the directive can be selected dynamically at runtime), but am concentrating on the static part for now. Parsing has only be

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Ping? Does anyone have any opinions on how this issue should be resolved? On 09/07/2021 12:16 pm, Kwok Cheung Yeung wrote: 3) In the OpenMP examples (version 5.0.1), section 9.7, the example metadirective.3.c does not work as expected. #pragma omp declare target void exp_pi_diff(double *d

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Hello Thanks for your reply. On 26/07/2021 3:29 pm, Jakub Jelinek wrote: On Fri, Jul 09, 2021 at 12:16:15PM +0100, Kwok Cheung Yeung wrote: 3) In the OpenMP examples (version 5.0.1), section 9.7, the example metadirective.3.c does not work as expected. #pragma omp declare target void

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Hello On 26/07/2021 8:56 pm, Jakub Jelinek wrote: On Mon, Jul 26, 2021 at 08:28:16PM +0100, Kwok Cheung Yeung wrote: In Section 1.2.2 of the OpenMP TR10 spec, 'target variant' is defined as: A version of a device routine that can only be executed as part of a target region. Yes,

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
On 26/07/2021 10:23 pm, Jakub Jelinek wrote: On Mon, Jul 26, 2021 at 10:19:35PM +0100, Kwok Cheung Yeung wrote: In that comment, Deepak says: So, we decided to keep the target trait static, requiring that the declare target directive must be explicit and that the function version must be

[COMMIT] wwwdocs: Document devel/omp/gcc-11

2021-05-13 Thread Kwok Cheung Yeung
, and have moved devel/omp/gcc-10 to the list of inactive branches. Kwok commit 8a006e10264a471a8f9ece2ce3720eff0910f77d Author: Kwok Cheung Yeung Date: Thu May 13 22:09:36 2021 +0100 Document devel/omp/gcc-11 branch This also moves the old devel/omp/gcc-10 branch to the inactive

[PATCH] openmp: Notify team barrier of pending tasks in, omp_fulfill_event

2021-05-17 Thread Kwok Cheung Yeung
ding and offloading to Nvidia, with no fails. Okay to commit to master, releases/gcc-11 and devel/omp/gcc-11? Thanks Kwok From 348c7cd00e358a8dc0b7563055f367fce2713fa5 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 14 May 2021 09:59:11 -0700 Subject: [PATCH] openmp: Notify team ba

[PATCH v2] openmp, fortran: Add Fortran support for indirect clause on the declare target directive

2024-02-05 Thread Kwok Cheung Yeung
f6662a7bc76d400fecb5013ad6d6ab3b00b8a6e7 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 5 Feb 2024 20:31:49 + Subject: [PATCH] openmp, fortran: Add Fortran support for indirect clause on the declare target directive 2024-02-05 Kwok Cheung Yeung gcc/fortran

Re: [PATCH v2] openmp, fortran: Add Fortran support for indirect clause on the declare target directive

2024-02-06 Thread Kwok Cheung Yeung
69e0fd Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 5 Feb 2024 20:31:49 + Subject: [PATCH] openmp, fortran: Add Fortran support for indirect clause on the declare target directive 2024-02-05 Kwok Cheung Yeung gcc/fortran/ * dump-parse-tree.cc

[COMMITTED] libgomp: Update documentation for indirect calls in target regions

2024-02-15 Thread Kwok Cheung Yeung
Hi, I have committed this patch to the libgomp documentation to reflect that indirect calls in offloaded target regions are now supported in C, C++ and Fortran. KwokFrom b3b3bd250f0a7c22b7d46d3522c8b94c6a35d22a Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 15 Feb 2024 21:22:26

[PATCH] openmp: Change to using a hashtab to lookup offload target addresses for indirect function calls

2024-01-22 Thread Kwok Cheung Yeung
e reached do the initialisation. This removes the need for locking during initialisation. Tested with offloading to NVPTX and GCN with a x86_64 host. Okay for master? Thanks KwokFrom 721ec33bec2fddc7ee37e227358e36fec923f8da Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 17 Jan 2024 16

[PATCH] openmp, fortran: Add Fortran support for indirect clause on the declare target directive

2024-01-22 Thread Kwok Cheung Yeung
ed to Fortran where appropriate. Okay for mainline? Thanks KwokFrom 545bdb2c8ab9a43e79c7a3a2992bd9edc7d08a6f Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 11 Jan 2024 19:52:53 + Subject: [PATCH 2/2] openmp, fortran: Add Fortran support for indirect clause on the declare targe

[committed] MAINTAINERS: Update my email address

2024-01-29 Thread Kwok Cheung Yeung
I have committed this to update my work email address in MAINTAINERS (but forgot to change my git user.mail first - oops!). Thanks Kwok Yeung From f3fdaa3eecd155dbdc78c1ec9a259dfa4e379ea4 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 29 Jan 2024 16:40:49 + Subject: [PATCH

[PATCH v2] openmp: Change to using a hashtab to lookup offload target addresses for indirect function calls

2024-01-29 Thread Kwok Cheung Yeung
Can you please akso update the comments to talk about hashtab instead of splay? Hello This version has the comments updated and removes a stray 'volatile' in the #ifdefed out code. Thanks KwokFrom 5737298f4f5e5471667b05e207b22c9c91b94ca0 Mon Sep 17 00:00:00 2001 From: Kwok Ch

[committed] Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2024-01-03 Thread Kwok Cheung Yeung
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); ... maintain separate 'if' branches for 'FUNC_MAP' vs. 'IND_FUNC_MAP', so that we're able to easily locate those with 'grep', for example. From 6ae84729940acff598e1a7f49d7b381025082ceb Mon Sep 1

[committed] Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2024-01-03 Thread Kwok Cheung Yeung
xplicitly list such cases as gcc_unreachable (it might imply that it can reach the ME, but just not at that particular point?) or not though. KwokFrom a56a693a74dd3bee71b1266b09dbd753694ace94 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 3 Jan 2024 14:34:39 + Subject: [PATC

Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-11-07 Thread Kwok Cheung Yeung
Yes, I believe that is the right fix. The version in libgomp/config/accel/ should then override the version in libgomp/ for accelerator targets. I'll do a quick check that this works as expected and push it ASAP. Sorry for breaking the build for so many targets! Kwok On 07/11/2023 9:51 pm,

[PATCH 0/3] openmp: Add support for iterators in OpenMP mapping clauses (C/C++)

2024-05-24 Thread Kwok Cheung Yeung
This series of patches adds support for OpenMP iterators in the 'map' clause of the 'target' construct (and it's derivatives such as 'target enter data'), and the 'to' and 'from' constructs of the 'target update' construct, currently for C and C++ only. The approach in this patch differs from

[PATCH 1/3] openmp: Refactor handling of iterators

2024-05-24 Thread Kwok Cheung Yeung
erator clause with a macro OMP_ITERATOR_DECL_P, as it needs to be done frequently.From 0439fce03c2b5fb2802eaf65831e28f548ca074b Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 12 Mar 2024 20:51:38 + Subject: [PATCH 1/3] openmp: Refactor handling of iterators Move code to calculate

[PATCH 2/3] openmp: Add support for iterators in map clauses (C/C++)

2024-05-24 Thread Kwok Cheung Yeung
info array, inserting them into the list of mappings at the point where iterator data occurred.From b2e8ff46929d5a2781781486ec942b344056d78b Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 12 Mar 2024 22:51:06 + Subject: [PATCH 2/3] openmp: Add support for iterators in map clauses

[PATCH 3/3] openmp: Add support for iterators in to/from clauses (C/C++)

2024-05-24 Thread Kwok Cheung Yeung
This patch extends the previous patch to cover to/from clauses in 'target update'.From 99addc124535307b50fbdeb66c4f90bb0cbeb041 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 15 Apr 2024 13:50:22 +0100 Subject: [PATCH 3/3] openmp: Add support for iterators in to/from cla

[PATCH v2 0/5] openmp: Add support for iterators in OpenMP mapping clauses

2024-09-03 Thread Kwok Cheung Yeung
This is an improved version of the previous series that was posted at: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652680.html Compared to the previous version, this version delays the gimplification of iterators until the very end of gimplify_adjust_omp_clauses (instead of doing it in

[PATCH v2 1/5] openmp: Refactor handling of iterators

2024-09-03 Thread Kwok Cheung Yeung
ator clause with a macro OMP_ITERATOR_DECL_P, as it needs to be done frequently.From d2cf47a312d9decc14d0cf37fa57ad358a96743d Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19:33:08 +0100 Subject: [PATCH 1/5] openmp: Refactor handling of iterators Move code to calculate the

[PATCH v2 2/5] openmp: Add support for iterators in map clauses (C/C++)

2024-09-03 Thread Kwok Cheung Yeung
, inserting them into the list of mappings at the point where iterator data occurred.From dd65c671dc9f5fb34290938a413c610eb0110ef6 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19:33:47 +0100 Subject: [PATCH 2/5] openmp: Add support for iterators in map clauses (C/C++) This adds

[PATCH v2 3/5] openmp: Add support for iterators in 'target update' clauses (C/C++)

2024-09-03 Thread Kwok Cheung Yeung
This patch extends the previous patch to cover to/from clauses in 'target update'.From c3dfc4a792610530a4ab729c3f250917b828e469 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19:34:09 +0100 Subject: [PATCH 3/5] openmp: Add support for iterators in 'target u

[PATCH v2 4/5] openmp, fortran: Add support for map iterators in OpenMP target construct (Fortran)

2024-09-03 Thread Kwok Cheung Yeung
or the target, only the address associated with the first map generated by an iterator is set (as only a single slot in the data structure is allocated for each iterator map).From f7cdf555e9d5c49b455a364a1eef2123c7bb76d1 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19

[PATCH v2 5/5] openmp, fortran: Add support for iterators in OpenMP 'target update' constructs (Fortran)

2024-09-03 Thread Kwok Cheung Yeung
This patch adds parsing and translation of the 'to' and 'from' clauses for the 'target update' construct in Fortran.From cfb6b76da5bba038d854d510a4fd44ddf4fa8f1f Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19:34:29 +0100 Subject: [P

[PR96519] Re: [PATCH][testsuite] Add gcc.dg/ia64-sync-5.c

2020-08-11 Thread Kwok Cheung Yeung
xed by making the array element types explicitly signed. This issue is tracked as issue 96519 on the tracker. I have checked that the test now passes on PowerPC and Aarch64. Is the fix okay for trunk? Thanks Kwok commit fc6ac3af45a238da0bd65e020ae6f0f165b57b87 Author: Kwok Cheung Yeung Date: Tu

[committed] [OG10] Add nvptx support for subword compare-and-swap

2020-08-12 Thread Kwok Cheung Yeung
Author: Kwok Cheung Yeung Date: Wed Aug 12 12:37:20 2020 -0700 nvptx: Add support for subword compare-and-swap This adds support for __sync_val_compare_and_swap and __sync_bool_compare_and_swap for 1-byte and 2-byte long values, which are not natively supported on nvptx

[committed] [OG10] Backport fixes for PR94690

2020-08-14 Thread Kwok Cheung Yeung
94690) (commit 0ec52417fd9b3bef5227cdc9a18ff4f0247b0ea4) Kwok From b39d180f83a15eaf0b1a42afd4990378be8229e8 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 14 Aug 2020 05:20:39 -0700 Subject: [PATCH 2/2] =?UTF-8?q?[Fortran]=20OpenMP=205=20=E2=80=93=20permit?= =?UTF-8?q?=20more=20sh

[committed] [OG10] Backport OpenMP-related patches

2020-08-18 Thread Kwok Cheung Yeung
Kwok Cheung Yeung + + Backport from mainline + 2020-06-25 Tobias Burnus + + PR fortran/95837 + * resolve.c (gfc_resolve_substring_charlen): Remove + bogus ts.kind setting for the expression. + 2020-08-14 Kwok Cheung Yeung Backport from mainline diff -

  1   2   3   >