[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

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

[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

[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 Cheung Yeung

[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] openmp, fortran: Add Fortran support for indirect clause on the declare target directive

2024-01-22 Thread Kwok Cheung Yeung
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 target directive 2024-01

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

2024-01-22 Thread Kwok Cheung Yeung
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:53:40 + Subject

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

2024-01-03 Thread Kwok Cheung Yeung
Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 3 Jan 2024 14:34:39 + Subject: [PATCH] openmp: Adjust position of OMP_CLAUSE_INDIRECT in OpenMP clauses Move OMP_CLAUSE_INDIRECT so that it is outside of the range checked by OMP_CLAUSE_SIZE and OMP_CLAUSE_DECL. 2024-01-03 Kwok

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

2024-01-03 Thread Kwok Cheung Yeung
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 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 3 Jan 2024 14:27:39 + Subject:

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,

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

2023-11-03 Thread Kwok Cheung Yeung
r: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955From adcd938b1dee1cc5a9df6efee40d47a2aab254f8 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 3 Nov 2023 18:03:50 + Subject: [PATCH] openmp: Add support for the 'indirect' clause

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

2023-10-08 Thread Kwok Cheung Yeung
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. Functions declared as indirect may be called via function

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_FUNCTION

[PATCH] amdgcn: Enable SIMD vectorization of math functions

2023-02-28 Thread Kwok Cheung Yeung
- 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 Feb 2023 14

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

2023-02-17 Thread Kwok Cheung Yeung
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 From: Kwok Cheung Yeung Date

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

2023-02-14 Thread Kwok Cheung Yeung
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 'present' map modifier

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

2023-02-09 Thread Kwok Cheung Yeung
Hello I've ported my patch for supporting the OpenMP 5.1 'present' modifier and committed it to the devel/omp/gcc-12 development branch: 229b705862c openmp: Add support for the 'present' modifier Tested with offloading on amdgcn and nvptx. Kwok

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

2023-02-03 Thread Kwok Cheung Yeung
for GCC 13 now, but will this be okay for GCC 14? Thanks KwokFrom ba9368f88514a27f374d84e53e36ce36fa9ac5bc Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 3 Feb 2023 13:04:21 + Subject: [PATCH] openmp: Add support for the 'present' modifier This implements support for the OpenMP 5.1

Re: [PATCH][OG12] amdgcn: Support AMD-specific 'isa' and 'arch' traits in OpenMP context selectors

2022-12-02 Thread Kwok Cheung Yeung
So this is the OG12-specific part (including metadirective and dynamic context selectors) of the previous patch. Once https://gcc.gnu.org/r13-4446-ge41b243302e996 is backported, is it OK for OG12? Looks good to me, thanks! Kwok

Re: [PATCH][OG12] amdgcn: Support AMD-specific 'isa' and 'arch' traits in OpenMP context selectors

2022-11-30 Thread Kwok Cheung Yeung via Gcc-patches
Hello PA, --- libgomp/config/gcn/selector.c +++ libgomp/config/gcn/selector.c @@ -36,7 +36,7 @@ GOMP_evaluate_current_device (const char *kind, const char *arch, if (kind && strcmp (kind, "gpu") != 0) return false; - if (arch && strcmp (arch, "gcn") != 0) + if (arch && (strcmp

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

2022-11-08 Thread Kwok Cheung Yeung
Hello These additional patches were pushed onto the devel/omp/gcc-12 branch to fix various issues with the SIMD math library: ecf1603b7ad amdgcn: Fix expansion of GCN_BUILTIN_LDEXPV builtin 6c40e3f5daa amdgcn: Various fixes for SIMD math library 8e6c5b18e10 amdgcn: Fixed intermittent failure

[COMMITTED] amdgcn: Fix expansion of GCN_BUILTIN_LDEXPV builtin

2022-11-08 Thread Kwok Cheung Yeung
2001 From: Kwok Cheung Yeung Date: Tue, 8 Nov 2022 14:38:23 + Subject: [PATCH] amdgcn: Fix expansion of GCN_BUILTIN_LDEXPV builtin 2022-11-08 Kwok Cheung Yeung gcc/ * config/gcn/gcn.cc (gcn_expand_builtin_1): Expand first argument of GCN_BUILTIN_LDEXPV to V64DFmode

[PATCH] amdgcn: Add builtins for vectorized native versions of abs, floorf and floor

2022-11-08 Thread Kwok Cheung Yeung
37f49b204d501327d0867b3e8a3f01b9445fb9bd Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 8 Nov 2022 11:59:58 + Subject: [PATCH] amdgcn: Add builtins for vectorized native versions of abs, floorf and floor 2022-11-08 Kwok Cheung Yeung gcc/ * config/gcn/gcn

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

2022-11-03 Thread Kwok Cheung Yeung
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_log_

[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

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

2022-09-08 Thread Kwok Cheung Yeung
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, ceil, exp2

[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

[og12] [committed] Fix bootstrap build of OG12

2022-06-30 Thread Kwok Cheung Yeung
"selected %<-foffload-memory%> option"); flag_offload_memory = OFFLOAD_MEMORY_UNIFIED; } else if (!strcmp (p, "dynamic_allocators")) -- 2.25.1 From e9ee746093bd989c33685e3197c75b901aef2cc1 Mon Sep 17 00:00:00

[committed] wwwdocs: Document devel/omp/gcc-12

2022-06-29 Thread Kwok Cheung Yeung
the previous devel/omp/gcc-11 branch now joins the list of inactive OMP branches. KwokFrom 0695e5e969eba730e517a6adbdf38b8774f89437 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 29 Jun 2022 22:32:39 +0100 Subject: [PATCH] Document devel/omp/gcc-12 branch Also moves the old devel/omp/gcc-11

[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
ated 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 the type o

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: [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

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

2022-02-28 Thread Kwok Cheung Yeung
the 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

[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: 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
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 like: #pragma omp

[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

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

2022-02-14 Thread Kwok Cheung Yeung
(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 metadirectives This adds

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

2022-02-14 Thread Kwok Cheung Yeung
f '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: [PATCH 1/2] openmp: Eliminate non-matching metad

Re: [OG11][committed] OpenMP metadirective support

2022-01-31 Thread Kwok Cheung Yeung
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, 31 Jan 2022 05:44:21

[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

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

2022-01-28 Thread Kwok Cheung Yeung
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 actually not a dynamic property. So

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

[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

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

2022-01-24 Thread Kwok Cheung Yeung
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 gcc/ * builtin

[PATCH] openmp: Metadirective patch fixes

2022-01-24 Thread Kwok Cheung Yeung
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: Fri, 21 Jan 2022 18:23:57

[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

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

2021-12-10 Thread Kwok Cheung Yeung
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 support

[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 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 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 2/7] openmp: Add middle-end support for metadirectives

2021-12-10 Thread Kwok Cheung Yeung
hrough 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 2021 22:29:34

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

2021-12-10 Thread Kwok Cheung Yeung
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: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 19:15:23 +

[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

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()}'

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

2021-10-18 Thread Kwok Cheung Yeung
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 variant

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

2021-10-14 Thread Kwok Cheung Yeung
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. --- libgomp

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

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
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
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

[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

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

2021-05-17 Thread Kwok Cheung Yeung
ing 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 barr

[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

[commit] [OG10] amdgcn: Add gfx908 support

2021-03-25 Thread Kwok Cheung Yeung
Hello I have backported commit 3535402e20118655b2ad4085a6e1d4f1b9c46e92 (amdgcn: Add gfx908 support) from mainline to the devel/omp/gcc-10 branch as commit bb55967ccde0b48f285150caf6443a327159b4a2. This adds support for the gfx908 GPU type. Kwok

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

2021-03-01 Thread Kwok Cheung Yeung
a112 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 collapsed loop variables,

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

2021-02-25 Thread Kwok Cheung Yeung
o 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 Subject: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738

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

2021-02-24 Thread Kwok Cheung Yeung
p parallel' either. Is there any way of doing this within OpenMP or do we have to resort to creating threads outside of OpenMP? Thanks Kwok From 0fa4deb89f3778ccacd64b01de377ba2b7879db1 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 21 Jan 2021 05:38:47 -0800 Subject: [PATCH] op

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

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

2021-02-19 Thread Kwok Cheung Yeung
* 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:47 -0800 Subject: [PATCH] openmp: Fix intermittent hanging of ta

[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:

[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 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

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 has been

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

2021-01-21 Thread Kwok Cheung Yeung
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 taskwait, and fixes a number o

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

2021-01-16 Thread Kwok Cheung Yeung
Thanks for the review. On 16/01/2021 9:25 am, Jakub Jelinek wrote: On Fri, Jan 15, 2021 at 03:07:56PM +, Kwok Cheung Yeung wrote: + { + tree detach_decl = OMP_CLAUSE_DECL (*detach_seen); + + for (pc = , c = clauses; c ; c = *pc) + { + bool remove

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

2021-01-15 Thread Kwok Cheung Yeung
On 15/01/2021 3:07 pm, Kwok Cheung Yeung wrote: I have tested bootstrapping on x86_64 (no offloading) with no issues, and running the libgomp testsuite with Nvidia offloading shows no regressions. I have also tested all the gomp.exp tests in the main gcc testsuite, also with no issues. I am

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

2021-01-15 Thread Kwok Cheung Yeung
On 10/12/2020 2:38 pm, Jakub Jelinek wrote: On Wed, Dec 09, 2020 at 05:37:24PM +, Kwok Cheung Yeung wrote: --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -14942,6 +14942,11 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort) pc = _CLAUSE_CHAIN (c

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

2021-01-11 Thread Kwok Cheung Yeung
wrote: On Wed, Dec 09, 2020 at 05:37:24PM +, Kwok Cheung Yeung wrote: --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -14942,6 +14942,11 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort) pc = _CLAUSE_CHAIN (c); continue; + case OMP_CLAUSE_DETACH

Re: [OG10][committed] Backport openmp: Implicit 'declare target' for C++ static initializers

2020-12-18 Thread Kwok Cheung Yeung
On 18/12/2020 7:27 pm, Kwok Cheung Yeung wrote: Hello I have now backported the "openmp: Implicit 'declare target' for C++ static initializers" patch from mainline to the devel/omp/gcc-10 branch. The testcase required a small tweak as the gimple output has changed since OG10 wa

Re: [PATCH] openmp: Implicit 'declare target' for C++ static initializers

2020-12-18 Thread Kwok Cheung Yeung
On 18/12/2020 7:31 pm, Jakub Jelinek wrote: On Fri, Dec 18, 2020 at 03:10:52PM +, Kwok Cheung Yeung wrote: 2020-12-17 Kwok Cheung Yeung gcc/testsuite/ * g++.dg/gomp/declare-target-3.C: New. Note the test fails on the trunk when one doesn't have offloading configured

[OG10][committed] Backport openmp: Implicit 'declare target' for C++ static initializers

2020-12-18 Thread Kwok Cheung Yeung
Hello I have now backported the "openmp: Implicit 'declare target' for C++ static initializers" patch from mainline to the devel/omp/gcc-10 branch. The testcase required a small tweak as the gimple output has changed since OG10 was branched. This has been committed as commit

Re: [PATCH] openmp: Implicit 'declare target' for C++ static initializers

2020-12-18 Thread Kwok Cheung Yeung
, retested libgomp, and checked bootstrapping. Is this version okay for trunk now? Thanks Kwok From ef4a42c5174372dd0d72dc0efe2c608e693c7877 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 17 Dec 2020 12:10:18 -0800 Subject: [PATCH] openmp: Implicitly add 'declare target' directives

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

2020-12-09 Thread Kwok Cheung Yeung
On 09/12/2020 5:53 pm, Jakub Jelinek wrote: On Wed, Dec 09, 2020 at 05:37:24PM +, Kwok Cheung Yeung wrote: I believe this patch is largely complete now. I have done a bootstrap on x86_64 and run the testsuites with no regressions. I have also run the libgomp testsuite with offloading

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

2020-12-09 Thread Kwok Cheung Yeung
until GCC 11 is branched off)? Thanks Kwok commit 3d82db0fc3623e9dc241bed4c4cfd266574d45e7 Author: Kwok Cheung Yeung Date: Wed Dec 9 09:33:46 2020 -0800 openmp: Add support for the OpenMP 5.0 task detach clause 2020-12-09 Kwok Cheung Yeung gcc/ * builtin

PING Re: [PATCH] openmp: Implicit 'declare target' for C++ static initializers

2020-11-27 Thread Kwok Cheung Yeung
Hello This patch still needs review. Thanks Kwok On 19/11/2020 6:07 pm, Kwok Cheung Yeung wrote: On 29/10/2020 10:03 am, Jakub Jelinek wrote: I'm actually not sure how this can work correctly. Let's say we have int foo () { return 1; } int bar () { return 2; } int baz () { return 3; } int

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

2020-11-27 Thread Kwok Cheung Yeung
Hello This is an updated version of the WIP patch for task detach support. Any comments would be welcome! On 11/11/2020 7:06 pm, Kwok Cheung Yeung wrote: - No error checking at the front-end. The detach clause is now parsed properly in C, C++ and Fortran, and will raise an error

Nested declare target support

2020-11-20 Thread Kwok Cheung Yeung
Hello New OpenMP 5.0 features that won't be available in GCC 9, are planned for GCC 10 or later versions as time permits: ... - nested declare target support You said in an email two years ago that nested declare target was not supported yet. I do not see any patches that claim to

Re: [PATCH] openmp: Implicit 'declare target' for C++ static initializers

2020-11-19 Thread Kwok Cheung Yeung
with Nvidia offloading. Thanks, Kwok From 0348b149474d0922d79209705e6777e7af271e0d Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 18 Nov 2020 13:54:01 -0800 Subject: [PATCH] openmp: Implicitly add 'declare target' directives for dynamic initializers in C++ 2020-11-18 Kwok Cheung Yeung

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

2020-11-18 Thread Kwok Cheung Yeung
On 18/11/2020 11:41 am, Jakub Jelinek wrote: On Thu, Nov 12, 2020 at 10:44:35PM +, Kwok Cheung Yeung wrote: + /* OMP_NESTED is deprecated in OpenMP 5.0. */ + if (parse_boolean ("OMP_NESTED", )) + gomp_global_icv.max_active_levels_var = +

[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

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

2020-11-12 Thread Kwok Cheung Yeung
rsion 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.1 This remo

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

2020-11-11 Thread Kwok Cheung Yeung
? 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_INT): New

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

[PATCH] openmp: Retire nest-var ICV

2020-11-06 Thread Kwok Cheung Yeung
ike it 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: deprecations in OpenMP 5.0

2020-11-05 Thread Kwok Cheung Yeung
ok 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 and -fopenmp to comp

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-10-28 Thread Kwok Cheung Yeung
Hello I found this almost two-year old thread while looking for how the OpenMP 5.0 deprecations were to be handled. E.g. if somebody tries hard to write portable OpenMP code and has: omp_lock_t lock; #if __OPENMP__ >= 201811L omp_init_lock_with_hint (, omp_sync_hint_contended); #elif

[PATCH] openmp: Implicit 'declare target' for C++ static initializers

2020-10-28 Thread Kwok Cheung Yeung
with no offloading on x86-64. Okay for trunk? Thanks Kwok commit d2c8c5bd2826851b727e93a8ea2141596e50a621 Author: Kwok Cheung Yeung Date: Wed Oct 28 07:13:14 2020 -0700 openmp: Implicitly add 'declare target' directives for dynamic static initializers in C++ 2020-10-28 Kwok Cheung

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Kwok Cheung Yeung
On 20/10/2020 1:57 pm, Jakub Jelinek wrote: On Tue, Oct 20, 2020 at 02:17:26PM +0200, Tobias Burnus wrote: On 10/20/20 2:11 PM, Tobias Burnus wrote: Unfortunately, the committed patch (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) causes build errors. The error seems to be provoked by

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-19 Thread Kwok Cheung Yeung
Thanks Kwok commit 82555f50d2930f973ab20782ebcb836b719bce96 Author: Kwok Cheung Yeung Date: Mon Oct 19 10:47:42 2020 -0700 openmp: Implement support for OMP_TARGET_OFFLOAD environment variable This implements support for the OMP_TARGET_OFFLOAD environment variable introduc

  1   2   3   >