[wwwdocs] gcc-13/changes.html + projects/gomp/: OpenMP update

Tobias Burnus tobias@codesourcery.com
Mon Jan 16 08:17:56 GMT 2023


Hi Gerald,

On 14.01.23 22:47, Gerald Pfeifer wrote:

> I made a couple of incremental edits. See below for what I just pushed
> (and please speak up if you see any issues).
>
> commit 2f870cba5aaaa8c81449beb618a9030824360a25

...

> --- a/htdocs/gcc-13/changes.html
> +++ b/htdocs/gcc-13/changes.html
> @@ -54,10 +54,10 @@ a work-in-progress.</p>

...

> +      <code>requires</code> directive are now accepted. However, the
>         <code>requires_offload</code>, <code>unified_address</code>
> -      and <code>unified_shared_memory</code> clauses cause that the
> -      only available device is the initial device (the host). Fortran now
> +      and <code>unified_shared_memory</code> clauses imply the initial
> +      device (= the host) as the only available device. Fortran now

I really stumble over the "as" – that sounds wrong and I fail to parse this part.
I think it should be "is".

On the technical side, in principle, available devices are the host (aka "initial device") –
and all installed** (nonhost) devices – in our case nvptx and (amd)gcn GPUs.

However, when using 'requires', all installed devices which do not fulfill
the requirement(s) are removed from the list of available devices. In case of
'dynamic_allocators', all devices support it, in case of 'reverse_offload' all installed
amdgcn devices are filtered out and, for unified-shared memory,* neither nvptx nor
amdgcn support it – and are removed from the list – such that at the end, only
the host remains. (Hence, device code ('target regions') will run on the host
→ host fallback.)

BTW: Before the release, further updates to changes.html are required. – For instance,
as alluded in the previous paragraph, 'reverse offload' is (now) supported for nvptx.
(But not yet with amdgcn.)

Tobias

(*) There is support for unified-shared memory for both nvptx and gcn,
but the existing patches either have to be reviewed or to be revised.

(**) I coined the term 'installed device'. OpenMP since TR11 contains some
definitions for 'available devices' – which consists of the union of supported
and accessible devices (possibly after sorting and further filtering). Namely:

accessible devices – The host device and all non-host devices accessible for execution.

supported devices – The host device and all non-host devices supported by the
implementation for execution of target code for which the device-related requirements
of the requires directive are fulfilled.

The available-devices-var is in turn by default "*" – where "* expands to all accessible
and supported devices". (The device list can be further filtered and sorted via
the environment variable OMP_AVAILABLE_DEVICES.)

-----------------
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: München; Registergericht München, HRB 106955


More information about the Gcc-patches mailing list