---------- Forwarded message ---------
From: Zhang lv <zhanglv0...@gmail.com>
Date: Tue, Mar 11, 2025 at 6:06 PM
Subject: Re: [GSoC][Fortran – DO CONCURRENT] Interest in 2025 GSoC –
Fortran DO CONCURRENT Auto-Parallelization
To: Damian Rouson <damian@archaeologic.codes>


Hi Damian and GFortran community,

Thanks for sharing insights on the evaluation of automatic parallelization.
The neural network training and deployment infrastructure Fiats extensively
leverages Fortran’s DO_CONCURRENT to facilitate concurrency. Several
compilers fully or partially support this feature, including LLVM
(flang-new), NAG (nagfor), GNU (gfortran), and Intel (ifx). It would be
valuable to use Fiats as a benchmark for auto-parallelization performance
and compare it across different compiler implementations.

Regarding project evaluation, I’m unsure about the experimental platform
and benchmark selection. Will we test across multiple platforms (e.g.,
gcc/testsuite/gfortran.target, where AArch64 and RISC-V are listed),
considering that different ISA support might influence results? Previously,
I used SPEC2006, SPEC2017, and STREAM, but I’m not sure which benchmarks
are commonly used in GFortran development.

Thanks also for the example of reduce locality. After reviewing PR101602,
it seems DO_CONCURRENT interacts with locality and reduce, but full support
is still lacking. As I’m new to Fortran grammar, could I get some
suggestions on how to define the scope of DO_CONCURRENT grammar? Should I
consider its interaction with features like locality and reduce? At this
stage, is it better to inspect the source code directly, or should I first
analyze statistics on related grammar usage in
testsuite/gfortran.dg/do_concurrent_*.f90?

Best,

Chenlu

On Tue, Mar 11, 2025 at 4:32 AM Damian Rouson <damian@archaeologic.codes>
wrote:

> Jerry,
>
> See
>
> https://github.com/BerkeleyLab/fiats/blob/c256784fbd3eb28053daad657fc01c3caaf562d4/src/fiats/neural_network_s.F90#L871.
> The F2023_LOCALITY macro switches on the use of reduce locality.  The
> F2018_LOCALITY macro uses only locality specifiers that were in Fortran
> 2018.  The F2008_LOCALITY macro switches to default locality. In this code,
> the biggest savings comes from reduce locality.
>
> Damian
>
> On Mon, Mar 10, 2025 at 10:20 Jerry D <jvdelis...@gmail.com> wrote:
>
>> On 3/10/25 4:29 AM, Damian Rouson wrote:
>> > If this moves forward, I’d like to offer example code to target in
>> Fiats
>> > (https://go.lbl.gov/fiats <https://go.lbl.gov/fiats>).  I presented
>> > automatic parallelization results produced by compiling with LLVM
>> flang-
>> > new for inference at the PAW-ATM workshop at SC24 (see https://
>> > go.lbl.gov/just-write-fortran <https://go.lbl.gov/just-write-fortran>).
>>
>> > It would be great to have a similar capability with gfortran.  And I
>> > would be especially excited if Fortran 2023 reduce locality is
>> > supported. In our training algorithm, the use of reduce locality
>> reduces
>> > one block of code from around 10 statements to one statement.
>> >
>> > Damian
>> >
>> Damian,
>>
>> Can you send an example of that one block of code as an example. You may
>> have already done so, I have lost track in between some other burning
>> issues.
>>
>> Regards,
>>
>> Jerry
>>
>

Reply via email to