[valgrind] [Bug 383010] Add support for AVX-512 instructions

2024-05-16 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=383010

Paul Floyd  changed:

   What|Removed |Added

 CC||lefer...@gmail.com

--- Comment #96 from Paul Floyd  ---
*** Bug 487124 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2024-04-19 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=383010

he...@henrimenke.de changed:

   What|Removed |Added

 CC||he...@henrimenke.de

--- Comment #95 from he...@henrimenke.de ---
I wanted to give these patches a try, but I can't figure out which version of
Valgrind these are supposed to apply to.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2024-02-24 Thread Gabriel Ravier
https://bugs.kde.org/show_bug.cgi?id=383010

Gabriel Ravier  changed:

   What|Removed |Added

 CC||gabrav...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2024-02-23 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=383010

Paul Floyd  changed:

   What|Removed |Added

 CC||hjl.to...@gmail.com

--- Comment #94 from Paul Floyd  ---
*** Bug 481729 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2024-01-30 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||k...@chrisada.co.uk

--- Comment #93 from Tom Hughes  ---
*** Bug 480545 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-06-15 Thread Richard Jones
https://bugs.kde.org/show_bug.cgi?id=383010

Richard Jones  changed:

   What|Removed |Added

 CC||rjo...@redhat.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-05-31 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||toitran4...@gmail.com

--- Comment #92 from Tom Hughes  ---
*** Bug 470489 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-05-17 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||tus...@kazv.moe

--- Comment #91 from Tom Hughes  ---
*** Bug 469878 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-05-09 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #90 from Tom Hughes  ---
*** Bug 339416 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-05-09 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||arnaud.desit...@gmail.com

--- Comment #89 from Tom Hughes  ---
*** Bug 417572 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-04-25 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=383010

JojoR  changed:

   What|Removed |Added

 CC||rjie...@gmail.com

--- Comment #88 from JojoR  ---
Excellent work, it's a long time :)

Is there any schedule for upstreaming about this feature ?
these patches looks like a prototype implementation ?

I opened another thread about RISC-V vector, some issues should be
common in VEX or plugin Memcheck, even more vector ISA generator :)
Any suggestions for these ? @Tanya @Julian Seward

BTW, is there anyone interested in ARM's SVE or RISC-V vector ?
See more details from https://bugs.kde.org/show_bug.cgi?id=468979

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-04-20 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=383010

Mark Wielaard  changed:

   What|Removed |Added

 CC||rincebr...@gmail.com

--- Comment #87 from Mark Wielaard  ---
*** Bug 450952 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-04-20 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=383010

Mark Wielaard  changed:

   What|Removed |Added

 CC||paola_...@libero.it

--- Comment #86 from Mark Wielaard  ---
*** Bug 460203 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-04-20 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=383010

Mark Wielaard  changed:

   What|Removed |Added

 CC||ktstngubl...@bugfoo.com

--- Comment #85 from Mark Wielaard  ---
*** Bug 468544 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-04-20 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=383010

Mark Wielaard  changed:

   What|Removed |Added

 CC||m...@klomp.org
  Alias||valgrind-avx512

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-12-15 Thread Patrick J. LoPresti
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #84 from Patrick J. LoPresti  ---
(In reply to Sam James from comment #79)
> Are Tanya's patches still pending review? Is there an outstanding known
> issue with them?

Similar question... What are the outstanding tasks here, and do they have
owners? Can I help?

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-12-15 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||kobalicek.p...@gmail.com

--- Comment #83 from Tom Hughes  ---
*** Bug 463082 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-11-22 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||smuel...@chronox.de

--- Comment #82 from Tom Hughes  ---
*** Bug 462135 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-09-26 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=383010

Paul Floyd  changed:

   What|Removed |Added

 CC||mfran...@pppl.gov

--- Comment #81 from Paul Floyd  ---
*** Bug 458218 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-09-26 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=383010

Bug Janitor Service  changed:

   What|Removed |Added

   Priority|NOR |VHI

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-09-26 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=383010

Paul Floyd  changed:

   What|Removed |Added

 CC||tiborg...@gmail.com

--- Comment #80 from Paul Floyd  ---
*** Bug 458305 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-08-03 Thread Sam James
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #79 from Sam James  ---
Are Tanya's patches still pending review? Is there an outstanding known issue
with them?

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-06-14 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||ytr...@sdf-eu.org

--- Comment #78 from Tom Hughes  ---
*** Bug 451837 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-06-14 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||fchen0...@gmail.com

--- Comment #77 from Tom Hughes  ---
*** Bug 455279 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-06-14 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||arkang...@gmail.com

--- Comment #76 from Tom Hughes  ---
*** Bug 408140 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-02-11 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #75 from Tanya  ---
Julian reported VPTESTMW and VPTESTMB instruction failures - these instructions
read data with incorrect granularity (64 and 32 bits instead of 16 and 8 bits,
respectively). The granularity has been specified in the master file
incorrectly.
Attached an updated master file (also corrects granularity for VPTESTNMW and
VPTESTNMB, and corrects exception types for several instructions) and the
generated files ("Version 4: Part 2 of AVX-512 patch - auto-generated files").

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-02-11 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #142995|0   |1
is obsolete||

--- Comment #74 from Tanya  ---
Created attachment 146573
  --> https://bugs.kde.org/attachment.cgi?id=146573=edit
Version 4: Part 4 of AVX-512 patch - (optional) Generator of AVX-512 .c files

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-02-11 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #142993|0   |1
is obsolete||

--- Comment #73 from Tanya  ---
Created attachment 146572
  --> https://bugs.kde.org/attachment.cgi?id=146572=edit
Version 4: Part 2 of AVX-512 patch - auto-generated files

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-01-18 Thread melven
https://bugs.kde.org/show_bug.cgi?id=383010

melven  changed:

   What|Removed |Added

 CC||Melven.Roehrig-Zoellner@DLR
   ||.de

--- Comment #72 from melven  ---
Small remark:

If valgrind is compiled explicitly for the skylake_avx512 architecture with GCC
11 (e.g. as done by https://spack.readthedocs.io on appropriate hardware),
there is a kmovq instruction generated in vgpreload_memcheck-amd64-linux.so.

This triggers an "unrecognised instruction" error for any executable run with
valgrind (memcheck):
```
vex amd64->IR: unhandled instruction bytes: 0xC4 0xE1 0xFB 0x92 0xC8 0x48 0x8D
0x5 0xC0 0x71
vex amd64->IR:   REX=0 REX.W=1 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=1 VEX.L=0 VEX.n=0x0 ESC=0F
vex amd64->IR:   PFX.66=0 PFX.F2=1 PFX.F3=0
==3481== valgrind: Unrecognised instruction at address 0x4c629f4.
==3481==at 0x4C629F4: stpcpy (vg_replace_strmem.c:1180)
...
```

Everything works of course fine, if one just compiles (generically) for
arch=x86_64.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-01-12 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #71 from Tanya  ---
Created attachment 145364
  --> https://bugs.kde.org/attachment.cgi?id=145364=edit
Update for AVX-512 Valgrind regression tests to spot differences between mask
k0 and no mask

(In reply to Julian Seward from comment #70)
> I worry that there are potentially other places where the IR is generated
> using `getKReg(mask)` when really it should be `mask ? getKReg(mask) :
> mkU64(0)`, and that testing isn't catching these.  Not sure though.

Attached a patch to AVX-512 regression tests that catches this kind of errors
by writing a random value in k0 before each test.
It did not detect any other affected instructions.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2022-01-01 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #70 from Julian Seward  ---
Created attachment 145020
  --> https://bugs.kde.org/attachment.cgi?id=145020=edit
Fix handling of no-mask reg-reg versions of VEXPAND* and VCOMPRESS*

Here's a bug fix for the VEXPAND and VCOMPRESS instructions, specifically for
the register-to-register, mask-free versions.  By "mask-free" I mean they do
not specify any of `{k1}` to `{k7}`.  (I think that makes the instructions
into trivial reg-to-reg copies, but that's irrelevant).  The bug is that the
generated IR acts as if `{k0}` had been specified, and so the result depends
on whatever value is in `k0` at the time.

I worry that there are potentially other places where the IR is generated
using `getKReg(mask)` when really it should be `mask ? getKReg(mask) :
mkU64(0)`, and that testing isn't catching these.  Not sure though.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-12-29 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #69 from Tanya  ---
Created attachment 144938
  --> https://bugs.kde.org/attachment.cgi?id=144938=edit
Fix copyright notices on the new AVX-512 files

Patches attached in comment #58, comment #59, comment #60 and comment #61 had
incorrect copyright notices. Attached a patch with a fix.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-12-29 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #68 from Julian Seward  ---
Created attachment 144930
  --> https://bugs.kde.org/attachment.cgi?id=144930=edit
valgrind-avx512-rollup-fixes-2021Dec29.diff

Rollup fixes to be applied on top of (after) the patches in comments 58, 59 and
60:

* fixes the problem described in comment 67.  The patch set extends
  AMD64Instr::CStore and AMD64Instr::CLoad to also handle 8- and 16- bit
  conditional stores and loads.  However, the emit_AMD64Instr clauses for
  these cases were not correct and still generating 64-bit transactions.  This
  fixes them.  That removes a bunch of incorrect results in regression tests,
  and crashing when running real programs.  The test case avx512-skx is still
  failing, though.

* [trivial fixes] fixes segfaults caused by insufficient alignment in test
  cases avx512-l1.c and avx512-l2.c

* [temporary] disables a few test cases in avx512-l1.c since they don't run on
  my hardware (Core i5-1135G7), even natively.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-12-28 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #67 from Julian Seward  ---
Created attachment 144910
  --> https://bugs.kde.org/attachment.cgi?id=144910=edit
Demonstrates misbehaving `vmovdqu8 %ymm7, (%r9){%k5}`

I've been testing the patches from comment 58, 59, 60 against the trunk, using
Fedora 35 running on a Core i5-1135G7.  It passes the tests in the comment 60
patch, but causes regressions in various other tests.  I tracked one problem
down to an incorrect implementation of 256-bit stores that use a guard
register (k1 .. k7).  This causes glibc's memset() to misbehave, hence causing
--tool=none runs to fail.

Testcase is attached.  I imagine it's caused by an incorrect translation into
IR, but I haven't figured out how that translation is done.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-11-03 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 CC||mgsext...@gmail.com

--- Comment #66 from Tanya  ---
*** Bug 441609 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Sam James
https://bugs.kde.org/show_bug.cgi?id=383010

Sam James  changed:

   What|Removed |Added

 CC||s...@gentoo.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Patrick J. LoPresti
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #65 from Patrick J. LoPresti  ---
(In reply to Tanya from comment #64)
> 
> If you would make the patch into a new branch - would you be interested in
> its internal commit history, perhaps for git blame?

I am not a Valgrind maintainer; I have only submitted a few patches. I just did
not want to ask for something without offering something...

I just think it would be really nice if this support could live on a branch in
the official repository, if not (yet) delivered to the mainline.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #64 from Tanya  ---
(In reply to Patrick J. LoPresti from comment #63)
> Could someone please work on getting these changes into mainline? Or at
> least make this a branch in the git repository? (Is there anything I can do
> to help?)
> 
> AVX-512 is now a "must have" for us.

Hello,

If you would make the patch into a new branch - would you be interested in its
internal commit history, perhaps for git blame?

If yes, preparing it with git-format-patch turned out to be too verbose. If
it'd be useful, would it be possible to grant me access to this branch, perhaps
temporarily?

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Patrick J. LoPresti
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #63 from Patrick J. LoPresti  ---
Could someone please work on getting these changes into mainline? Or at least
make this a branch in the git repository? (Is there anything I can do to help?)

AVX-512 is now a "must have" for us.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #62 from Tanya  ---
Attached an updated version of the AVX-512 patch for KNL and SkyLake. It does
not contain any principal changes comparing to the previous version, just bug
fixes.
It is based on Valgrind 3.18 (GIT master from Oct 22, commit
b77dbefe72e4a5c7bcf1576a02c909010bd56991)
For build and test instructions, please refer to comment #51
(https://bugs.kde.org/show_bug.cgi?id=383010#c51)

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #135974|0   |1
is obsolete||
 Attachment #140028|0   |1
is obsolete||

--- Comment #61 from Tanya  ---
Created attachment 142995
  --> https://bugs.kde.org/attachment.cgi?id=142995=edit
Version 3: Part 4 of AVX-512 patch - (optional) Generator of AVX-512 .c files

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #140027|0   |1
is obsolete||

--- Comment #60 from Tanya  ---
Created attachment 142994
  --> https://bugs.kde.org/attachment.cgi?id=142994=edit
Version 3: Part 3 of AVX-512 patch - AVX-512 tests

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #140026|0   |1
is obsolete||

--- Comment #59 from Tanya  ---
Created attachment 142993
  --> https://bugs.kde.org/attachment.cgi?id=142993=edit
Version 3: Part 2 of AVX-512 patch - auto-generated files

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-10-29 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #140025|0   |1
is obsolete||

--- Comment #58 from Tanya  ---
Created attachment 142992
  --> https://bugs.kde.org/attachment.cgi?id=142992=edit
Version 3: Part 1 of AVX-512 patch - main implementation

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-07-13 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #57 from Tanya  ---
Attached an updated version of the AVX-512 patch for KNL and SkyLake. It is
based on Valgrind 3.18 (GIT master from Jul, 13, commit
61307ee83121aa5f0b57a12a80e90fc2f414380a)

The major improvements are:
- Fixes for runtime crashes
- Changed the way masked instructions access memory

For build and test instructions, please refer to comment #51
(https://bugs.kde.org/show_bug.cgi?id=383010#c51)

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-07-13 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #56 from Tanya  ---
Created attachment 140028
  --> https://bugs.kde.org/attachment.cgi?id=140028=edit
Version 2: Part 4 of AVX-512 patch - (optional) Generator of AVX-512 .c files

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-07-13 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #135973|0   |1
is obsolete||

--- Comment #55 from Tanya  ---
Created attachment 140027
  --> https://bugs.kde.org/attachment.cgi?id=140027=edit
Version 2: Part 3 of AVX-512 patch - AVX-512 tests

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-07-13 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #135972|0   |1
is obsolete||

--- Comment #54 from Tanya  ---
Created attachment 140026
  --> https://bugs.kde.org/attachment.cgi?id=140026=edit
Version 2: Part 2 of AVX-512 patch - auto-generated files

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-07-13 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #135971|0   |1
is obsolete||

--- Comment #53 from Tanya  ---
Created attachment 140025
  --> https://bugs.kde.org/attachment.cgi?id=140025=edit
Version 2: Part 1 of AVX-512 patch - main implementation

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-02-28 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=383010

Mark Wielaard  changed:

   What|Removed |Added

 CC||shaveer.bajpeyi@mail.utoron
   ||to.ca

--- Comment #52 from Mark Wielaard  ---
*** Bug 428004 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-02-20 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #51 from Tanya  ---
Hello,

Attached updated AVX-512 patch for KNL and SkyLake.
It is based on the GIT master from Feb. 20 (commit
1c9a0bf58a47e855e6e5bf78a30bcee0af835804)

Attached files
~~
- AVX-512_KNL_SKX_p1_main.patch - Main AVX-512 Valgrind patch
- AVX-512_KNL_SKX_p2_data.patch - Files, automatically generated by a script.
These files are required for the build
- AVX-512_KNL_SKX_p3_test.patch - AVX-512 regression tests
- AVX-512_KNL_SKX_p4_filegen.patch - Generator of Valgrind AVX-512 .c files
from a file with instruction descriptions. Not required for build or usage;
useful for adding new instructions or modifying AVX-512 behaviour

Functionality
~
- No known regressions on AVX2 machines
- Nulgrind is functional (no known failures of small AVX-512 applications) on
KNL and SkyLake
- Memcheck does not crash on AVX-512 code; the analysis might still be
incorrect

Limitations
~~~
- Needs GCC version 8 or newer
- Cannot emulate AVX-512 code on AVX-2 or older machine (some AVX-512
instructions are emulated through intrinsics)

Build and test
~~
Clone Valgrind master:
> git clone https://sourceware.org/git/valgrind.git
> cd valgrind
Apply the patch:
> git apply AVX-512_KNL_SKX_p1_main.patch
> git apply AVX-512_KNL_SKX_p2_data.patch
> git apply AVX-512_KNL_SKX_p3_test.patch
Optional development tool, not required for the build process:
> git apply AVX-512_KNL_SKX_p4_filegen.patch

Build:

Please check that GCC version is 8 or higher.
> ./autogen.sh
> ./configure --prefix=
On AVX-512 machine, verify that AVX-512 version will be built: open config.log
and check that "BUILD_AVX512_TESTS_TRUE=''" and "CFLAGS=' -DAVX_512'" lines
exist.
> make install

Quick test:
/bin/valgrind ls

Invoke a script to generate reference AVX-512 tests results (they are not
provided with the patch because file size exceeds limit set by bugtracker):
> ./scripts/generate_test_results.sh
Run regression tests:
> make regtest

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-02-20 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #50 from Tanya  ---
Created attachment 135974
  --> https://bugs.kde.org/attachment.cgi?id=135974=edit
Part 4 of AVX-512 patch - (optional) Generator of AVX-512 .c files

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-02-20 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #109005|0   |1
is obsolete||

--- Comment #49 from Tanya  ---
Created attachment 135973
  --> https://bugs.kde.org/attachment.cgi?id=135973=edit
Part 3 of AVX-512 patch - AVX-512 tests

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-02-20 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #48 from Tanya  ---
Created attachment 135972
  --> https://bugs.kde.org/attachment.cgi?id=135972=edit
Part 2 of AVX-512 patch - auto-generated files

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-02-20 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #128799|0   |1
is obsolete||
 Attachment #129652|0   |1
is obsolete||

--- Comment #47 from Tanya  ---
Created attachment 135971
  --> https://bugs.kde.org/attachment.cgi?id=135971=edit
Part 1 of AVX-512 patch - main implementation

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2021-02-19 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||qoman...@gmail.com

--- Comment #46 from Tom Hughes  ---
*** Bug 433272 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-09-09 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||mingfei@ucloud.cn

--- Comment #45 from Tom Hughes  ---
*** Bug 426330 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-06-24 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=383010

Alexandra Hajkova  changed:

   What|Removed |Added

 Attachment #129528|0   |1
is obsolete||

--- Comment #44 from Alexandra Hajkova  ---
Created attachment 129652
  --> https://bugs.kde.org/attachment.cgi?id=129652=edit
patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-06-24 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #43 from Alexandra Hajkova  ---
My git repo:
https://github.com/sasshka/valgrind/commit/2a9d9c2a5e6021cd1b928e03aabb9e493cde5cdd
I tested the patch on Knights Landing. I had to rename gdbserver xml files for
gdbserver tests to pass - they used to have avx with upper cases:
64bit-avx512-valgrind-s2.xml
64bit-avx512-valgrind-s1.xml
64bit-avx512.xml

The patch doesn't seem to handle AVX512 subsets, the knights landing I used
didn't have KADD instruction which was added for BW/DQ (according to
https://en.wikipedia.org/wiki/AVX-512#New_instructions_by_sets)

avx512.stdout.exp is missing in the patch with makes avx512 test to always
fail.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-06-19 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=383010

Alexandra Hajkova  changed:

   What|Removed |Added

 Attachment #129525|0   |1
is obsolete||

--- Comment #42 from Alexandra Hajkova  ---
Created attachment 129528
  --> https://bugs.kde.org/attachment.cgi?id=129528=edit
patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-06-19 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=383010

Alexandra Hajkova  changed:

   What|Removed |Added

 Attachment #128856|0   |1
is obsolete||
 Attachment #129522|0   |1
is obsolete||

--- Comment #41 from Alexandra Hajkova  ---
Created attachment 129525
  --> https://bugs.kde.org/attachment.cgi?id=129525=edit
patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-06-19 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #40 from Alexandra Hajkova  ---
Created attachment 129522
  --> https://bugs.kde.org/attachment.cgi?id=129522=edit
patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-06-18 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||mr...@protonmail.com

--- Comment #39 from Tom Hughes  ---
*** Bug 423182 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-05-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #38 from Tanya  ---
(In reply to Alexandra Hajkova from comment #37)
> Created attachment 128856 [details]
> patch
> 
> Hello Tanya,
> 
> I slighly modified your patch to make it appliable (removed trailing
> whitespaces, etc.) and used git format-patch.

Hello Alexandra, 
Thank you! I will use this format for further patches.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-05-28 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #37 from Alexandra Hajkova  ---
Created attachment 128856
  --> https://bugs.kde.org/attachment.cgi?id=128856=edit
patch

Hello Tanya,

I slighly modified your patch to make it appliable (removed trailing
whitespaces, etc.) and used git format-patch.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-05-28 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=383010

Alexandra Hajkova  changed:

   What|Removed |Added

 CC||ahajk...@redhat.com

--- Comment #36 from Alexandra Hajkova  ---
(In reply to Tanya from comment #34)
> Created attachment 128799 [details]
> Refactored implementation for Skylake machines
> 
> Attached patch "AVX-512_prototype_all_skx_insns.patch". It implements
> Skylake AVX-512 instruction subsets (AVX-512F, AVX-512CD, AVX-512VL,
> AVX-512BW, AVX-512 DQ) and refactors AVX-512 functionality in the following
> way:
> - AVX-512 functionality is separated from the main code and only available
> under "AVX_512" define
> - AVX-512 instruction information is moved to C structures. They can be
> automatically generated form a master .csv file
> - Minimal AVX-512 Memcheck enabling
> 
> The patch is in alpha-stage. It has been tested on AVX-512 NPB benchmarks:
> some benchmarks pass validation under Nulgrind and Memcheck, but validation
> failures and crashes still occur, and Memcheck often reports false-positive
> errors.

Hello Tanya,

This work is great. But do you have any special reason to not to use git
format-patch? This patch does not applies. 

Thank you,
Alexandra

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-05-26 Thread Patrick J. LoPresti
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #35 from Patrick J. LoPresti  ---
(In reply to Tanya from comment #34)

Nice to see work resuming on this.

Valgrind is almost useless for us at this point, because AVX-512 CPUs are now
ubiquitous and the performance benefits are too large to ignore.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-05-26 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #111693|0   |1
is obsolete||
 Attachment #111694|0   |1
is obsolete||
 Attachment #111695|0   |1
is obsolete||
 Attachment #111696|0   |1
is obsolete||
 Attachment #111697|0   |1
is obsolete||
 Attachment #111698|0   |1
is obsolete||

--- Comment #34 from Tanya  ---
Created attachment 128799
  --> https://bugs.kde.org/attachment.cgi?id=128799=edit
Refactored implementation for Skylake machines

Attached patch "AVX-512_prototype_all_skx_insns.patch". It implements Skylake
AVX-512 instruction subsets (AVX-512F, AVX-512CD, AVX-512VL, AVX-512BW, AVX-512
DQ) and refactors AVX-512 functionality in the following way:
- AVX-512 functionality is separated from the main code and only available
under "AVX_512" define
- AVX-512 instruction information is moved to C structures. They can be
automatically generated form a master .csv file
- Minimal AVX-512 Memcheck enabling

The patch is in alpha-stage. It has been tested on AVX-512 NPB benchmarks: some
benchmarks pass validation under Nulgrind and Memcheck, but validation failures
and crashes still occur, and Memcheck often reports false-positive errors.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-05-01 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||bvanass...@acm.org

--- Comment #33 from Tom Hughes  ---
*** Bug 393351 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2020-05-01 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=383010

Tom Hughes  changed:

   What|Removed |Added

 CC||aymaneltems...@hotmail.com

--- Comment #32 from Tom Hughes  ---
*** Bug 420834 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-09-08 Thread Jacek Tomaka
https://bugs.kde.org/show_bug.cgi?id=383010

Jacek Tomaka  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |CONFIRMED

--- Comment #31 from Jacek Tomaka  ---
*** This bug has been confirmed by popular vote. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-04-11 Thread Hou
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #30 from Hou, Ao-ping  ---
(In reply to Tanya from comment #27)
> > Hi, Tanya,
> > 
> > Thank you so much.
> > Once I get  new patch, I will try it for basic operations in AVX-512 double
> > precision.
> > 
> > Best Regards
> > 
> > Elliot
> 
> Hello Elliot,
> Attached a new patch. Sorry for the delay.
> 
> Thank you,
> Tanya

Hi, Tanya,

I cannnot merge with the following commands:
git apply --stat ../AVX-512_prototype_v4_all_knl_insns.patch

And there are two errors in this patch:
memcheck/mc_translate.c
@@ -3191,6 +3341,33 @@ IRAtom* expr2vbits_Triop ( MCEnv* mce,
 unary64Fx2_w_rm(mce, vatom1, vatom2),
 unary64Fx2_w_rm(mce, vatom1, vatom3)));

And
memcheck/tests/vbit-test/irops.c
@@ -1131,12 +1143,169 @@ static irop_t irops[] = {
   { DEFOP(Iop_Rotx32, UNDEF_ALL), },
   { DEFOP(Iop_Rotx64, UNDEF_ALL), },
   { DEFOP(Iop_PwBitMtxXpose64x2, UNDEF_64x2_TRANSPOSE), .ppc64 = 1, .ppc32 = 1
},

Could you help me to solve it.

THank you

Elliot Hou, Ao-ping

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-04-10 Thread Hou
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #29 from Hou, Ao-ping  ---
(In reply to Tanya from comment #27)
> > Hi, Tanya,
> > 
> > Thank you so much.
> > Once I get  new patch, I will try it for basic operations in AVX-512 double
> > precision.
> > 
> > Best Regards
> > 
> > Elliot
> 
> Hello Elliot,
> Attached a new patch. Sorry for the delay.
> 
> Thank you,
> Tanya

Hi, Tanya,

thank you.
I'll try these codes later.
Again, thank you so much.

Best Regards.

Elliot Hou, Ao-ping

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-29 Thread Chris Samuel
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #28 from Chris Samuel  ---
Hi there,

We hit the illegal instruction message on Skylake (6140) CPUs running valgrind
on programs linked against OpenMPI 3.0.0; the cause being that with our GCC 5.5
and higher installs memset() causes the VPXORD command to be emitted during
various initialisation routines which Valgrind can't handle.

It took a bit of digging to track down what was going on, so we're certainly
interested in this work!

All the best,
Chris (HPC sysadmin at Swinburne University of Technology in Melbourne,
Australia)

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-29 Thread Chris Samuel
https://bugs.kde.org/show_bug.cgi?id=383010

Chris Samuel  changed:

   What|Removed |Added

 CC||k...@csamuel.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Manodeep Sinha
https://bugs.kde.org/show_bug.cgi?id=383010

Manodeep Sinha  changed:

   What|Removed |Added

 CC||manod...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Patrick J . LoPresti
https://bugs.kde.org/show_bug.cgi?id=383010

Patrick J. LoPresti  changed:

   What|Removed |Added

 CC||lopre...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #27 from Tanya  ---
> Hi, Tanya,
> 
> Thank you so much.
> Once I get  new patch, I will try it for basic operations in AVX-512 double
> precision.
> 
> Best Regards
> 
> Elliot

Hello Elliot,
Attached a new patch. Sorry for the delay.

Thank you,
Tanya

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #26 from Tanya  ---
Created attachment 111698
  --> https://bugs.kde.org/attachment.cgi?id=111698=edit
Nulgrind tests for AVX-512 machine, part 5

Files AVX-512_prototype_v4_tests.patch_p1 - AVX-512_prototype_v4_tests.patch_p5
are parts of new Nulgrind tests, split up because of site file size limit.
To join them together, please run "cat AVX-512_prototype_v4_tests.patch_p? >
AVX-512_prototype_v4_tests.patch"

New test files, added by this patch (all in none/tests/amd64/):
avx512.vgtest, avx512.c, avx512.stdout.exp, avx512.stderr.exp - test for
AVX_512 instructions. VGETEXPPS and VSCALEFPS instruction tests fail on
denormal values.
avx-1_zmm.vgtest, avx-1_zmm.c, avx-1_zmm.stdout.exp, avx-1_zmm.stderr.exp -
test  for avx-1 instructions on AVX-512 machine. The only difference from
original avx-1 test file is that it check bytes 511:256 of the used registers
avx2-1_zmm.vgtest, avx2-1_zmm.c, avx2-1_zmm.stdout.exp avx2-1_zmm.stderr.exp -
test for avx-2 instructions on AVX-512 machine. The only difference from the
original file is that it check bytes 511:256 of the used registers

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #111696|0   |1
   is patch||

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #25 from Tanya  ---
Created attachment 111697
  --> https://bugs.kde.org/attachment.cgi?id=111697=edit
Nulgrind tests for AVX-512 machine, part 4

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #24 from Tanya  ---
Created attachment 111696
  --> https://bugs.kde.org/attachment.cgi?id=111696=edit
Nulgrind tests for AVX-512 machine, part 3

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #23 from Tanya  ---
Created attachment 111695
  --> https://bugs.kde.org/attachment.cgi?id=111695=edit
Nulgrind tests for AVX-512 machine, part 2

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #109001|0   |1
is obsolete||
 Attachment #109002|0   |1
is obsolete||
 Attachment #109004|0   |1
is obsolete||

--- Comment #22 from Tanya  ---
Created attachment 111694
  --> https://bugs.kde.org/attachment.cgi?id=111694=edit
Nulgrind tests for AVX-512 machine, part 1

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-03-28 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

Tanya  changed:

   What|Removed |Added

 Attachment #109000|0   |1
is obsolete||

--- Comment #21 from Tanya  ---
Created attachment 111693
  --> https://bugs.kde.org/attachment.cgi?id=111693=edit
Updated AVX-512 implementation prototype with all KNL instructions

The patch (AVX-512_prototype_v4_all_knl_insns.patch) implements all
instructions from four subsets of AVX-512 (F, ER, CD, PF), available on KNL
machines, in Nulgrind and in Memcheck. It also enables AVX-512 registers in
vgdb.

New source files, added by this patch:
- VEX/priv/host_generic_simd512.c - Implementation of AVX-512 instrucitons in
C, similar to VEX/priv/host_generic_simd256.c
- VEX/priv/host_generic_vrcp14.c - Reference implementations of VRCP14 and
VRSQRT14 instructions. 
- VEX/priv/host_generic_avx512er.c - Reference implementations of AVX-512 ER
instruction set (VRCP28, VRSQRT28, and VEXP2 instructions).
The latter two files are copied, with minor modifications, from
https://software.intel.com/en-us/articles/reference-implementations-for-IA-approximation-instructions-vrcp14-vrsqrt14-vrcp28-vrsqrt28-vexp2
, files RECIP14.c and RECIP28EXP2.c, correspondingly

AVX-512 KNL benchmarks that pass result verification under Nulgrind (not tested
under Memcheck yet) with the patch:
NPB IS, IOR, STREAM, STRIDE, AMG-2013, LAMMPS (both GCC-7.1.0 and Intel
Compiler 17.0.4 builds).

NPB benchmarks other than IS and the QMCPACK benchmark fail result verification
or crash.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-02-13 Thread Hou
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #20 from Hou, Ao-ping  ---
(In reply to Tanya from comment #19)
> (In reply to Hou, Ao-ping from comment #18)
> > Hello, 
> > I have patched the "AVX-512_prototype_v3" patch.
> > But I can not use this patch for _mm512_setr_pd(...)
> > Could you please help me to solve it ?
> > 
> > I encounter the following ERROR:
> > ...
> > 
> > Elliot
> 
> 
> Hello Elliot,
> 
> I can not reproduce the issue, but it looks like the application uses
> AVX-512 "vinsertf64x4" instruciton, which haven't been implemented in the
> patch.
> We still have a few AVX-512 instructions missing. I'll attach the updated
> patch with all AVX-512 instructions next week. 
> 
> Thank you,
> Tanya

Hi, Tanya,

Thank you so much.
Once I get  new patch, I will try it for basic operations in AVX-512 double
precision.

Best Regards

Elliot

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-02-13 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #19 from Tanya  ---
(In reply to Hou, Ao-ping from comment #18)
> Hello, 
> I have patched the "AVX-512_prototype_v3" patch.
> But I can not use this patch for _mm512_setr_pd(...)
> Could you please help me to solve it ?
> 
> I encounter the following ERROR:
> ...
> 
> Elliot


Hello Elliot,

I can not reproduce the issue, but it looks like the application uses AVX-512
"vinsertf64x4" instruciton, which haven't been implemented in the patch.
We still have a few AVX-512 instructions missing. I'll attach the updated patch
with all AVX-512 instructions next week. 

Thank you,
Tanya

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-02-11 Thread Hou
https://bugs.kde.org/show_bug.cgi?id=383010

Hou, Ao-ping  changed:

   What|Removed |Added

 CC||bill200...@gmail.com

--- Comment #18 from Hou, Ao-ping  ---
Hello, 
I have patched the "AVX-512_prototype_v3" patch.
But I can not use this patch for _mm512_setr_pd(...)
Could you please help me to solve it ?

I encounter the following ERROR:

[elliot@blacksburg ~]$ avx512-valgrind ./aaa 
==4021== Memcheck, a memory error detector
==4021== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==4021== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info
==4021== Command: ./aaa
==4021== 
dis_ESC_0F3A__EVEX - UNRECOGNIZED OPCODE 0x1A
==4021== Invalid read of size 4
==4021==at 0x400AB6: simd_assign(int, double*, double*) (in
/home/elliot/aaa)
==4021==by 0x400825: main (in /home/elliot/aaa)
==4021==  Address 0xfff1 is not stack'd, malloc'd or (recently)
free'd
==4021== 
==4021== 
==4021== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==4021==  Access not within mapped region at address 0xFFF1
==4021==at 0x400AB6: simd_assign(int, double*, double*) (in
/home/elliot/aaa)
==4021==by 0x400825: main (in /home/elliot/aaa)
==4021==  If you believe this happened as a result of a stack
==4021==  overflow in your program's main thread (unlikely but
==4021==  possible), you can try to increase the size of the
==4021==  main thread stack using the --main-stacksize= flag.
==4021==  The main thread stack size used in this run was 8388608.


And my code is:
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 

typedef double real;
typedef int64_t integer;
typedef __m512d realVect ;
typedef integer intVec __attribute__ ((vector_size(512)));
#define VECTOR_SIZE 8
#define SHIFT_SIZE 3

#define modSize(a) (((a>>SHIFT_SIZE )+1)<< SHIFT_SIZE)
#define NRM_RAND_VALE (5.0 - 10.0*(real)(rand()%1)/(real)1.0)

real *new_real(int n)
{
real *c = (real *)aligned_alloc(1024, sizeof(real)*modSize(n));
if(c==NULL){
fprintf(stderr, "%s Error --- Cannot allocate real
array\n",__FUNCTION__);
exit(1);
}
return c;
}

integer *new_integer(int n)
{
integer *c = (integer *)aligned_alloc(1024, sizeof(integer)*n);
if(c==NULL){
fprintf(stderr, "%s Error --- Cannot allocate int
array\n",__FUNCTION__);
exit(1);
}
return c;
}

inline void simd_assign(int n, real *c, real *a)
{
realVect *rvc=(realVect *)c;
for(int i=0; i>SHIFT_SIZE] = _mm512_setr_pd(a[i], a[i+1], a[i+2],
a[i+3], a[i+4], a[i+5], a[i+6], a[i+7]);
}
}




int main(int argc, char *argv[])
{
int N=10;
real *a=new_real(N);
real *c=new_real(N);

for(int i=0; i

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-02-07 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #17 from Tanya  ---
Hello Julian,

Sorry for a late reply.
Thank you very much for the comments. We have fixed most of these bugs, and
hope to finish adding and debugging KNL AVX-512 instructions in about a month.

Regarding the performance on AVX-2 code:
>> As a side note -- before this lands, I would want to do some performance 
>> runs to check that this doesn't impact performance (or correctness) of 
>> existing IA support.
On a few tiny AVX-2 benchmarks, Memcheck overhead is 0-1% bigger than that of a
"clean" Valgrind version. We will run and measure it on bigger AVX-2
benchmarks.
Do you have any obligatory benchmarks for Valgrind correctness and performance? 


Regarding the test files:
>> Is this intended to replace the existing AVX test?  Or is it a new test? 
>> This is unclear.
The attached tests are new tests, usable on AVX-512 machines only. They recheck
AVX and AVX-2 instructions on bigger vector registers, similarly to how avx-2.c
test rechecks avx-1 instructions on ymm registers. Would it be ok to keep them
as three separate tests files for AVX-512, or should they be merged into one
avx-512.c test file?


Regarding the FMA instructions:
>> If I understand this right, that means the existing cases for serial vFMA 
>> insns are wrong, and also the VEX implementation is wrong. Is that 
>> correct? If so, shouldn't we just fix both the test case and 
>> implementation?
The issue was, for serial (32- and 64-bit) FMA instructions, Valgrind used to
set bits [128:32] or [128:64] of the destination to zero, while they should be
left unchanged. We have fixed the implementation and added a new test, because
the none/tests/amd64/fma.c test seems to be designed to only verify one float
or one double value. 
Would you prefer us to provide not-AVX-512-related changes as a separate
patches?


I also have a question on our implementation of translation of EVEX
instructions to IR. 
Currently, we use separate functions for VEX- and EVEX- prefixed instructions
(file VEX/priv/guest_amd64_toIR.c, functions, for example, dis_ESC_0F38__VEX
and dis_ESC_0F38__EVEX, respectively). 

However, looking at the next Intel AVX-512 instruction sets, the VL (Vector
Length) set allows to run EVEX-prefixed instructions on xmm and ymm registers,
so it basically duplicates the VEX code (for example, EVEX-prefixed "vmovpdd
xmm1, xmm2" is an equivalent of VEX-prefixed "vmovpdd xmm1, xmm2").

The easiest way to implement it would be to unite the EVEX- and VEX- translator
functions into something like "dis_ESC_0F38__VEX_EVEX". On the upside, there
would be less duplicated code. On the downside, it means that EVEX-related code
would no longer be contained in separate __EVEX functions, so it would probably
be more difficult to review.
An alternate approach would be to add VL code (basically, copy the __VEX
translations) to the __EVEX functions. As a downside, it may be bothersome to
maintain the __VEX and the EVEX VL implementations identical.

It we were to implement those instructions in the future, what would be a
preferable approach?


Thank you,
Tanya

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-01-02 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #16 from Julian Seward  ---
(In reply to Tanya from comment #9)
> Created attachment 109005 [details]
> Nulgrind test for the serial vFMA instructions
> 
> The "AVX-512_prototype_v3" patch changes the behaviour of the serial vFMA
> instructions. For these instructions, Valgrind sets destination bits
> [127:64] or [127:32] to zero; according to the ISE, these bits should remain
> unchanged. The test covers the changed instructions.

If I understand this right, that means the existing cases for serial vFMA
insns are wrong, and also the VEX implementation is wrong.  Is that correct?

If so, shouldn't we just fix both the test case and implementation?

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-01-02 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #15 from Julian Seward  ---
(In reply to Tanya from comment #8)
> Created attachment 109004 [details]
> Nulgrind test for the AVX-2 instructions on AVX-512 machine
> 
> AVX-2 regression test based on the existing Nulgrind AVX-2 test, outputs ZMM
> instead of YMM

Same question here as in comment 14.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-01-02 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #14 from Julian Seward  ---
(In reply to Tanya from comment #7)
> Created attachment 109002 [details]
> Nulgrind test for the AVX instructions on AVX-512 machine
> 
> AVX regression test based on the existing Nulgrind AVX test, outputs ZMM
> registers instead of YMM

Is this intended to replace the existing AVX test?  Or is it a new
test?  This is unclear.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-01-02 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #13 from Julian Seward  ---
(In reply to Tanya from comment #6)
> Created attachment 109001 [details]
> Nulgrind test for the AVX-512 instructions
> 
> The test is based on the existing Nulgrind AVX and AVX-2 tests

Looks fine.  Just one comment:

-

UChar _randArray[2062] __attribute__((used));

Where does the 2062 number come from?  I'd prefer a #define with
some explanation.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2018-01-02 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #12 from Julian Seward  ---
(In reply to Tanya from comment #5)
> Created attachment 109000 [details]
> Updated AVX-512 implementation prototype

This looks pretty good.  I have a number of comments, many of them
just style/layout, but a few are a bit more than that, but nothing
serious.

As a side note -- before this lands, I would want to do some performance
runs to check that this doesn't impact performance (or correctness) of
existing IA support.

-

 static
+Bool have_avx512(void) {

   return (vai.hwcaps & VEX_HWCAPS_AMD64_AVX512 ? True : False);

Potential operator precedence problelsm for & vs ?: make me nervous.  Please
use

   (vai.hwcaps & VEX_HWCAPS_AMD64_AVX512) ? True : False

so we don't accidentally end up with

   vai.hwcaps & (VEX_HWCAPS_AMD64_AVX512 ? True : False)


-

valgrind-wip/valgrind/memcheck/mc_machine.c

@@ -873,7 +888,6 @@

if (o == GOF(FPSCR)&& sz == 4) return -1;
if (o == GOF(TPIDRURO) && sz == 4) return -1;
-   if (o == GOF(TPIDRURW) && sz == 4) return -1;
if (o == GOF(ITSTATE)  && sz == 4) return -1;

Looks like you need to update your -wip copy.  The TPIDRURW line
was added recently for ARM.

-

 void mc_LOADV_128_or_256_slow ( /*OUT*/ULong* res,
 Addr a, SizeT nBits, Bool bigendian )
 {
-   ULong  pessim[4]; /* only used when p-l-ok=yes */
+   ULong  pessim[16]; /* only used when p-l-ok=yes */

IIUC, you're now using this also to handle the slow case for 512 bit
loads.  Correct?

If so,
(1) please rename it to mc_LOADV_128_or_256_or_512_slow
(2) please verify that the 4->16 transition here is correct -- I suspect
it is not.  A ULong is 64 bits, so 'ULong  pessim[4]' contains one byte for
each byte in a 256-bit load.  So to make it work for 512 bit loads, don't
you only need to change it to 'ULong pessim[8]' ?

-

+void amd64g_dirtyhelper_CPUID_avx512 ( VexGuestAMD64State* st ) {

Please add a comment saying which processor this is taken from (or most
closely represents), like with all the other CPUID helper functions.

-

+#define OFFB_YMM32 offsetof(VexGuestAMD64State,guest_ZMM32) //NULL

What does //NULL here mean?  Maybe remove it?

-

+#define PFX_EVEXb  (1<<30)   /* EVEX b bit, if EVEX present, else 0 */
+#define PFX_EVEXTT (0xF<<32) /* EVEX tuple type (4-bits) if EVEX present, else
0 */

Please change these (also, all the pre-existing PFX_ values like PFX_ASO etc)
like this

   1ULL << 30
   0xFULL << 32

so that we don't get problems with (eg) the compiler shifting 0xF as 32-bits
left by 32 (giving zero) and *then* widening to 64 bits.

-

+static Int tuple_disp_map[14][3] = {

I assume that you want to access this using a TupleType for the first
index.  Please add this:

STATIC_ASSERT(FullVectorMask == 14)

just before the definition of tuple_disp_map.

-

+static int getMult(Prefix pfx) {
+   int type = getEvexType(pfx);

Please, use house types (Int instead of int).  Int is signed-32 on all
platforms that valgrind supports.

-

I'm not sure what function these are in, but anyway ..

+
+   // High 256 bits of ZMM0-ZMM15 registers
+   for (reg = 0; reg < 16; reg++) {
+  stmt( IRStmt_StoreG(
+   Iend_LE,
+   binop(Iop_Add64, mkexpr(addr), mkU64(1152 + reg * 32)),

and later

+  binop(Iop_Add64, mkexpr(addr), mkU64(1664 + lane*16 +
reg*64)),

Please don't use magic numbers 1152 and 1664.  Where do these come from?
Are they guest-state offsets?  If yes, please make them be derived from
OFFB_* values.  If no, please at least document where the numbers come
from and what else assumes those same numbers.

-

   IRExpr* ea  = binop(Iop_Add64, mkexpr(addr), mkU64(576 + reg * 16));

same

+  IRExpr* ea  = binop(Iop_Add64, mkexpr(addr), mkU64(1152 + reg * 32));

etc

-

+static IRExpr* mask_expr(Prefix pfx, IRExpr* unmasked, IRExpr* original) {

Nit: for big functions like this, please place the { on its own line.

In the same function:

+  default:
+  break;

If it is an internal logic bug that we get to this point, it would be better
to 'vassert(0)'.  But only if it's a bug in the code -- not if it is an
undecoded instruction.

-

+  assign( e1, amt >= size
+? mkV512(0)
+: binop(op, mkexpr(e0), mkU8(amt))
+);

Please fix the indentation here and below, to make it clearer that
there are 2 args.  (In emacs C-mode, pressing TAB often fixes it for me).

+  assign( e1, amt >= size
+? mkV512(0)
+: binop(op, mkexpr(e0), mkU8(amt))
+);

-

+   if (!getEvexMask(pfx)) {
putYMMRegLoAndZU( rG, unop(op, mkexpr(arg)) );
+   }

Indent the then-clause!

-

+static
+Long dis_AVX512_cmp_V_E_to_k ( /*OUT*/Bool* uses_,

+   IRTemp addr = IRTemp_INVALID;
+   Int alen = 0;
+   HChar dis_buf[50];
+   UInt mask = getEvexMask(pfx);
+   UChar modrm 

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2017-12-08 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #11 from Julian Seward  ---
Sorry for the delay.  I will review in the coming week (11-15 Dec).

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2017-11-21 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #10 from Tanya  ---
Hello, 
Sorry for the late response.

Please find the attachment for the patch AVX-512_prototype_v3.patch. It mainly
adds new instructions to Nulgrind; most of these instructions are not added to
Memcheck yet. The patch also enables AVX-512 in VGDB.

The patch has these updates to the AVX/AVX2 functionality:
1) AVX and AVX-2 instructions now set the unused upper half of destination ZMM
vector register to all zeros.
2) Serial FMA instructions are supposed to keep the destination bits [127:32]
for 32-bit instructions or [127:64] for the 64-bit unchanged; original Valgrind
sets them to zero. Please let us know if this should be a separate patch.

The tests for AVX-512, AVX-2, AVX and serial vFMA instructions are attached.
The vFMA test must run correctly on the AVX machines, too.


Please let me know if you would like us to provide the list of the implemented
AVX-512 instructions.

Regards,
Tanya

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2017-11-21 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #9 from Tanya  ---
Created attachment 109005
  --> https://bugs.kde.org/attachment.cgi?id=109005=edit
Nulgrind test for the serial vFMA instructions

The "AVX-512_prototype_v3" patch changes the behaviour of the serial vFMA
instructions. For these instructions, Valgrind sets destination bits [127:64]
or [127:32] to zero; according to the ISE, these bits should remain unchanged.
The test covers the changed instructions.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2017-11-21 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #8 from Tanya  ---
Created attachment 109004
  --> https://bugs.kde.org/attachment.cgi?id=109004=edit
Nulgrind test for the AVX-2 instructions on AVX-512 machine

AVX-2 regression test based on the existing Nulgrind AVX-2 test, outputs ZMM
instead of YMM

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2017-11-21 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #7 from Tanya  ---
Created attachment 109002
  --> https://bugs.kde.org/attachment.cgi?id=109002=edit
Nulgrind test for the AVX instructions on AVX-512 machine

AVX regression test based on the existing Nulgrind AVX test, outputs ZMM
registers instead of YMM

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2017-11-21 Thread Tanya
https://bugs.kde.org/show_bug.cgi?id=383010

--- Comment #6 from Tanya  ---
Created attachment 109001
  --> https://bugs.kde.org/attachment.cgi?id=109001=edit
Nulgrind test for the AVX-512 instructions

The test is based on the existing Nulgrind AVX and AVX-2 tests

-- 
You are receiving this mail because:
You are watching all bug changes.

  1   2   >