From: Thomas Koenig <tkoenig@netcologne.de>
To: Sandra Loosemore <sandra@codesourcery.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
Tobias Burnus <tobias@codesourcery.com>
Subject: Re: [OG10] Fortran: delinearize multi-dimensional array accesses
Date: Sat, 26 Dec 2020 11:41:32 +0100 [thread overview]
Message-ID: <5d972896-d5ef-df64-a663-a3a339b99e70@netcologne.de> (raw)
In-Reply-To: <a3959346-3e90-b30f-6ebe-bd89ebdf43e2@codesourcery.com>
Hi Sandra,
> The attached patch implements delinearization of array accesses in the
> Fortran front end, something that has been discussed for a long time.
Definitely - among others, this is the subject of PR 14741, which is by
now quite historic.
> I've been asked to try to get this patch committed on the OG10 branch
> since it is blocking some further optimization work with Graphite for
> OpenACC kernels regions. I have a mainline version of this patch as
> well that I can send to anyone interested in trying it out, but TBH, I
> don't think this is ready for mainline yet.
That would be indeed interesting. Could you post that to the list as
well?
The current status is that
> there are still two gfortran tests that are regressing
> (gfortran.dg/graphite/id-9.f and
> gfortran.dg/vect/fast-math-mgrid-resid.f), and while it's been confirmed
> that this helps with Graphite optimizations as intended, we haven't yet
> run any benchmarks to confirm that it doesn't make other things slower.
It is probably too late; this could go in for the next stage 1.
> (It might, for instance, be appropriate to only delinearize when
> Graphite optimizations are also enabled.)
Makes sense.
Does the patch actually make loop interchange for matrix multiplication
work (done with C for loops or Fortran DO loops), or is there additional
work required?
Regarding scalarized loops: We still to not collapse loops for
subroutine foo(a)
real, dimension(:,:), contiguous :: a
a = 5.
end subroutine foo
so an extension to scalarized loops would be quite valuable.
It would be interesting to see if
subroutine foo(a,n,m)
real, dimension(n,m) :: a
do j=1,m
do i=1,n
a(i,j) = 5.
end do
end do
end subroutine foo
is collapsed to a single loop with the patch and Graphite.
Best regards
Thomas
next prev parent reply other threads:[~2020-12-26 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 16:49 Sandra Loosemore
2020-12-26 10:41 ` Thomas Koenig [this message]
2021-01-07 19:35 ` Sandra Loosemore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d972896-d5ef-df64-a663-a3a339b99e70@netcologne.de \
--to=tkoenig@netcologne.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=sandra@codesourcery.com \
--cc=tobias@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).