[RFC][nvptx, libgomp] Add 128-bit atomic support

Tobias Burnus tobias@codesourcery.com
Fri Sep 11 15:29:23 GMT 2020


On 9/11/20 5:03 PM, tdevries wrote:

> On 2020-09-11 16:48, Andrew Stubbs wrote:
>> On 11/09/2020 15:25, Tom de Vries wrote:
>>> --- a/libgomp/testsuite/libgomp.c-c++-common/reduction-16.c
>>> +++ b/libgomp/testsuite/libgomp.c-c++-common/reduction-16.c
>>>
>>> @@ -1,4 +1,5 @@
>>>
>>> /*·{·dg-do·run·}·*/
>>> +/*·{·dg-additional-options·"-foffload=-latomic"·}·*/
>>
>> This will probably break amdgcn, where libatomic does not exist.
>>
> It looks like the customary way to handle that is to use
> offload_target_nvptx.

Or   { target { powerpc*-*-* } }  ?

For some (known) reasons, the __sync_val_compare_and_swap_16 is
produced for powerpc but not for x86-64.

I could imagine that GCN is affected in the same way as nvptx,
except that AMD's ROC is currently not supported for PowerPC,
if I understand it correctly. If FAIL start to occur in some
CPU/GPU combinations, it can be still revisited.

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter


More information about the Gcc-patches mailing list