public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikael at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/37131] inline matmul for small matrix sizes
Date: Sat, 05 Jun 2010 09:31:00 -0000 [thread overview]
Message-ID: <20100605093138.5142.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37131-10391@http.gcc.gnu.org/bugzilla/>
------- Comment #12 from mikael at gcc dot gnu dot org 2010-06-05 09:31 -------
(In reply to comment #9)
> I have thought a little bit about this, and the problem is
> a bit daunting ;-) Of course, this is at least partly because
> my experience with the scalarizer is close to non-existant, but you
> have to learn sometime.
>
> It seems that the functions for scalarizing do not help a lot
> here, because (for example) we need three nested loops for implementing
> the case where a and b are of rank 2.
>
> The preferred way would therefore be to state the rank 2 * rank 2 problem as
>
> do i=1,m
> do j=1,n
> c(i,j) = sum(a(i,:) * b(:,j))
> end do
> end do
>
> with the inner dot product borrowed using the scalarizer (borrowing
> from dot_product), and the outer loops using either hand-crafted
> TREE code or calling the DO translation.
>
> Comments? Is this reasonable?
>
The downside is that you can't use directly the matmul result in an expression.
You will need a temporary.
I'm working on nested scalarization loops for the sum intrinsic (pr43829) ;
inlining matmul should be straightforward after that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37131
next prev parent reply other threads:[~2010-06-05 9:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 19:24 [Bug fortran/37131] New: " tkoenig at gcc dot gnu dot org
2008-08-16 22:56 ` [Bug fortran/37131] " pinskia at gcc dot gnu dot org
2008-08-23 13:20 ` tkoenig at gcc dot gnu dot org
2008-11-29 16:20 ` burnus at gcc dot gnu dot org
2008-12-04 20:00 ` tkoenig at gcc dot gnu dot org
2008-12-09 22:13 ` tkoenig at gcc dot gnu dot org
2010-05-14 9:15 ` tkoenig at gcc dot gnu dot org
2010-06-04 22:32 ` tkoenig at gcc dot gnu dot org
2010-06-05 6:55 ` paul dot richard dot thomas at gmail dot com
2010-06-05 8:49 ` tkoenig at gcc dot gnu dot org
2010-06-05 9:31 ` mikael at gcc dot gnu dot org [this message]
2010-06-05 18:27 ` tkoenig at netcologne dot de
[not found] <bug-37131-4@http.gcc.gnu.org/bugzilla/>
2011-01-02 23:20 ` tkoenig at gcc dot gnu.org
2014-10-03 19:56 ` mikael at gcc dot gnu.org
2015-01-11 16:12 ` tkoenig at gcc dot gnu.org
2015-04-18 23:09 ` tkoenig at gcc dot gnu.org
2015-04-18 23:17 ` tkoenig at gcc dot gnu.org
2015-04-20 11:45 ` tkoenig at gcc dot gnu.org
2015-04-30 22:13 ` tkoenig at gcc dot gnu.org
2015-05-01 7:15 ` schwab@linux-m68k.org
2015-05-01 8:32 ` ubizjak at gmail dot com
2015-05-01 11:25 ` dominiq at lps dot ens.fr
2015-05-01 13:16 ` mikael at gcc dot gnu.org
2015-05-02 11:31 ` schwab@linux-m68k.org
2015-05-03 18:10 ` tkoenig at gcc dot gnu.org
2015-05-06 20:24 ` tkoenig at gcc dot gnu.org
2015-05-06 21:33 ` tkoenig at gcc dot gnu.org
2015-05-12 6:38 ` tkoenig at gcc dot gnu.org
2015-05-21 19:05 ` tkoenig at gcc dot gnu.org
2021-10-23 22:11 ` sandra at gcc dot gnu.org
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=20100605093138.5142.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).