public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Harald Anlauf <anlauf@gmx.de>
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: *PING* [PATCH] PR libfortran/99218 - [8/9/10/11 Regression] matmul on temporary array accesses invalid memory
Date: Mon, 1 Mar 2021 23:19:42 +0100	[thread overview]
Message-ID: <trinity-683d14d7-0473-4b4c-9ffc-4fd43c4ecce8-1614637182487@3c-app-gmx-bs32> (raw)
In-Reply-To: <trinity-531ae230-c976-4e80-985d-9fd3864efe56-1614116782427@3c-app-gmx-bs42>

Early ping.

Harald


> Gesendet: Dienstag, 23. Februar 2021 um 22:46 Uhr
> Von: "Harald Anlauf" <anlauf@gmx.de>
> An: "fortran" <fortran@gcc.gnu.org>, "gcc-patches" <gcc-patches@gcc.gnu.org>
> Betreff: [PATCH] PR libfortran/99218 - [8/9/10/11 Regression] matmul on temporary array accesses invalid memory
>
> Dear all,
>
> under certain circumstances a call to MATMUL for rank-2 times rank-1
> would invoke a highly tuned rank-2 times rank-2 algorithm which could
> lead to invalid reads and writes.  The solution is to check the rank
> of the second argument to matmul and fall back to a regular algorithm
> for rank-1.  The invalid accesses did show up with valgrind.
>
> I have not been able to create a testcase that gives wrong results.
>
> Regtested on x86_64-pc-linux-gnu, and verified with valgrind.
>
> OK for master?
>
> As this affects all open branches down to 8, ok for backports?
>
> Thanks,
> Harald
>
>
> PR libfortran/99218 - matmul on temporary array accesses invalid memory
>
> Do not invoke tuned rank-2 times rank-2 matmul if rank(b) == 1.
>
> libgfortran/ChangeLog:
>
> 	PR libfortran/99218
> 	* m4/matmul_internal.m4: Invoke tuned matmul only for rank(b)>1.
> 	* generated/matmul_c10.c: Regenerated.
>         * generated/matmul_c16.c: Likewise.
>         * generated/matmul_c4.c: Likewise.
>         * generated/matmul_c8.c: Likewise.
>         * generated/matmul_i1.c: Likewise.
>         * generated/matmul_i16.c: Likewise.
>         * generated/matmul_i2.c: Likewise.
>         * generated/matmul_i4.c: Likewise.
>         * generated/matmul_i8.c: Likewise.
>         * generated/matmul_r10.c: Likewise.
>         * generated/matmul_r16.c: Likewise.
>         * generated/matmul_r4.c: Likewise.
>         * generated/matmul_r8.c: Likewise.
>         * generated/matmulavx128_c10.c: Likewise.
>         * generated/matmulavx128_c16.c: Likewise.
>         * generated/matmulavx128_c4.c: Likewise.
>         * generated/matmulavx128_c8.c: Likewise.
>         * generated/matmulavx128_i1.c: Likewise.
>         * generated/matmulavx128_i16.c: Likewise.
>         * generated/matmulavx128_i2.c: Likewise.
>         * generated/matmulavx128_i4.c: Likewise.
>         * generated/matmulavx128_i8.c: Likewise.
>         * generated/matmulavx128_r10.c: Likewise.
>         * generated/matmulavx128_r16.c: Likewise.
>         * generated/matmulavx128_r4.c: Likewise.
>         * generated/matmulavx128_r8.c: Likewise.
>
>

  reply	other threads:[~2021-03-01 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 21:46 Harald Anlauf
2021-03-01 22:19 ` Harald Anlauf [this message]
2021-03-04  2:16 ` Jerry DeLisle
2021-03-04 20:23   ` Aw: " Harald Anlauf
2021-03-05 19:56     ` Harald Anlauf

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=trinity-683d14d7-0473-4b4c-9ffc-4fd43c4ecce8-1614637182487@3c-app-gmx-bs32 \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).