mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2016-04-21, 05:57   #12
rudi_m
 
rudi_m's Avatar
 
Jul 2005

2·7·13 Posts
Default

Quote:
Originally Posted by Prime95 View Post
I dread converting all those FFT macros. It's probably months of work for zero reward. I'd rather MS just did their job, but they've invested little effort in MASM over the last decade.

That said, you are right -- I should investigate the alternatives.
Beside AVX512 support and more portability there would be another benefit:

1. Supporting new CPU features as early as possible would maybe help to avoid issues like the skylake bug. Who knows, I guess Intel has added prime95 to their test-suite lately. ;)

2. IMO we have a licensing issue with masm anyways. AFAIR masm EULA only allows generated binaries it to be run in Windows operating systems.


Quote:
Originally Posted by Mark Rose
I bet someone has written a compiler to convert masm to nasm.
JWASM and PoAsm seem to support masm syntax.
rudi_m is offline   Reply With Quote
Old 2016-04-21, 12:07   #13
bgbeuning
 
Dec 2014

3·5·17 Posts
Default

I made a small (70 lines of C++ and 80 lines of lex) program
that converts MASM macro like this

Quote:
fft2048K MACRO clm
pass1levels9pfa8 pass2_12_levels, 2048, clm
ENDM

fft2048Kp MACRO
pass1levels9complex4 pass2_12_levels, 2048, 2
ENDM
to an NASM macro like this

Quote:
%macro fft2048K 1
pass1levels9pfa8 pass2_12_levels, 2048, %1
%endmacro

%macro fft2048Kp 0
pass1levels9complex4 pass2_12_levels, 2048, 2
%endmacro
I will hold off on doing more until George decides on a path forward.
bgbeuning is offline   Reply With Quote
Old 2017-05-11, 20:26   #14
Anonuser
 
Sep 2014

29 Posts
Default

It seems that Microsoft has implemented partial AVX-512 support in MASM. Better late than never.
Anonuser is offline   Reply With Quote
Old 2017-05-11, 20:40   #15
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

22×7×167 Posts
Default

+3
petrw1 is offline   Reply With Quote
Old 2017-05-11, 21:34   #16
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Thumbs up → Started

Yup. Email came:

Quote:
Status update

An idea you support has been updated:

226 votes
started
+3 votes

Add support for AVX-512 in MASM
(No Status) → Started

Visual Studio Team
Visual Studio Team
Product Team, Microsoft Visual Studio
Batalov is offline   Reply With Quote
Old 2017-05-11, 21:37   #17
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

103·113 Posts
Default

Quote:
Originally Posted by Anonuser View Post
It seems that Microsoft has implemented partial AVX-512 support in MASM. Better late than never.
Not necessarily - see my note in the Hardware/Let's-buy-GIMPS-a-KNL thread.
ewmayer is offline   Reply With Quote
Old 2017-11-09, 04:34   #18
tServo
 
tServo's Avatar
 
"Marv"
May 2009
near the Tannhäuser Gate

2×3×109 Posts
Default Received reply from Microsoft about this

I just received an email from them about George's request to have people vote to get
it included in MASM:

=======================================================

An idea you supported has been closed. Thank you for your feedback.

3 votes have been returned to you. Give feedback on other ideas to help us decide what to build next.

265
votes
completed
+3 votes
Add support for AVX-512 in MASM
Started → Completed

As Andrew mentioned, we have implemented partial AVX-512 support in MASM and the compiler. Right now, it’s in the form of intrinsic functions and full support will come in a future VS release.

For more details check out this blog: https://blogs.msdn.microsoft.com/vcb...intel-avx-512/

We are marking this suggestion as complete and returning your votes. Please put them to good use again!

— Visual C++ Team

Visual Studio Team
Visual Studio Team
Product Team, Microsoft Visual Studio

==============================================================

Interestingly, the blog post referred to is from July !
tServo is offline   Reply With Quote
Old 2017-11-09, 17:14   #19
Mysticial
 
Mysticial's Avatar
 
Sep 2016

33210 Posts
Default

Quote:
Originally Posted by tServo View Post
I just received an email from them about George's request to have people vote to get
it included in MASM:

=======================================================

An idea you supported has been closed. Thank you for your feedback.

3 votes have been returned to you. Give feedback on other ideas to help us decide what to build next.

265
votes
completed
+3 votes
Add support for AVX-512 in MASM
Started → Completed

As Andrew mentioned, we have implemented partial AVX-512 support in MASM and the compiler. Right now, it’s in the form of intrinsic functions and full support will come in a future VS release.

For more details check out this blog: https://blogs.msdn.microsoft.com/vcb...intel-avx-512/

We are marking this suggestion as complete and returning your votes. Please put them to good use again!

— Visual C++ Team

Visual Studio Team
Visual Studio Team
Product Team, Microsoft Visual Studio

==============================================================

Interestingly, the blog post referred to is from July !
I'll note that the AVX512 support in the compiler is uselessly broken at the moment. Within the first hour of trying it, I ran into about 5 different bugs in their implementation and optimizer.
  • AVX512 register types aren't aligned to 64 bytes. So code will crash - let alone the performance penalty.
  • The compiler never uses (x/y/z)mm16 - 31. It only knows the bottom 16 registers.
  • For moves with blend-masking, the optimizer fails to treat the destination register as an input - thereby generating bad code.
  • Some of their permute intrinsics have the wrong prototype. So stuff that compiles on GCC/ICC won't compile on MSVC.
  • Using their AVX512 intrinsics leads to many spurious warnings in their header files.
I'm sure there are more. But since most of these were blockers, I couldn't test any further. Some of these require interface-breaking changes to fix. So I don't expect them to be fixed until VS2018 or VS2019. IOW, give them a few more years to get it right. But some of these *should* be fixed in 15.5 or shortly after.

These bugs are pretty egregious. And it's pretty clear that MS did not test their AVX512 intrinsics support much (if at all).

There's also an annoying bug that carries over from AVX2/FMA where the compiler never generates 213 or 132 FMA instructions when all the operands are registers. So you get tons of unnecessary reg-reg moves.

I can't speak much for the assembler though. And I assume that's the more important one for most of the people on this forum. But if you want to use AVX512 intrinsics on Windows, your only option is the Intel Compiler. AVX512 is uselessly broken on MSVC and last time I checked, MinGW is still uselessly broken for all AVX and up.
Mysticial is offline   Reply With Quote
Old 2017-11-09, 19:16   #20
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×53×71 Posts
Default

I've switched to Uasm (formerly HJWasm). While it has had many bugs, the developers fixed them quickly. Right now it is pretty solid, but I don't use all the possible AVX-512 instructions.
Prime95 is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vote Chess: Game 3 Xyzzy Chess 267 2015-10-30 09:34
Vote Chess: Game 2 henryzz Chess 288 2014-12-05 17:31
Vote Chess: Game 1 henryzz Chess 306 2013-07-08 18:29
Move 3 vote henryzz Game 1 - ♔♕♙♘♖♙ - Toxic Geckos 4 2012-10-19 15:16
Move 2 vote henryzz Game 1 - ♔♕♙♘♖♙ - Toxic Geckos 1 2012-10-10 15:11

All times are UTC. The time now is 02:48.


Sat Jul 17 02:48:45 UTC 2021 up 50 days, 36 mins, 1 user, load averages: 1.35, 1.42, 1.43

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.