From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19122 invoked by alias); 29 Jun 2012 07:19:36 -0000 Received: (qmail 19105 invoked by uid 22791); 29 Jun 2012 07:19:34 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jun 2012 07:19:20 +0000 From: "Joost.VandeVondele at mat dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/51119] MATMUL slow for large matrices Date: Fri, 29 Jun 2012 07:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jb at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg01916.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51119 Joost VandeVondele changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Joost.VandeVondele at mat | |dot ethz.ch --- Comment #8 from Joost VandeVondele 2012-06-29 07:19:03 UTC --- (In reply to comment #7) > (In reply to comment #6) > > Janne, have you had a chance to look at this ? For larger matrices MATMMUL is > > really slow. Anything that includes even the most basic blocking scheme should > > be faster. I think this would be a valuable improvement. > > I implemented a block-panel multiplication algorithm similar to GOTO BLAS and > Eigen, but I got side-tracked by other things and never found the time to fix > the corner-case bugs and tune performance. IIRC I reached about 30-40 % of peak > flops which was a bit disappointing. I think 30% of peak is a good improvement over the current version (which reaches 7% of peak (92% for MKL) for a double precision 8000x8000 matrix multiplication) on a sandy bridge. In addition to blocking, is the Fortran runtime being compiled with a set of compile options that enables vectorization ? In the ideal world, gcc would recognize the loop pattern in the runtime library code, and do blocking, vectorization etc. automagically.