forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AVX512 makes killing speed?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 1879
Location: South Pole, Antarctica

PostPosted: Sun Nov 11, 2018 10:35 am    Post subject: AVX512 makes killing speed? Reply with quote

There was new 9th gen Intel processor i9-9900k tested on Anandtech recently reaching 5GHz. One of scientifically oriented tests on 3D particle movement I found produces very unusual result. There the older 7th gen processors reached 4-5x the speed of this new Intel and AMD incarnations despite of all of them were using AVX.



Most probably reason is that AVX512 was not implemented in these new processors and only AVX2 is there (which gives some boost too)

Would be nice to write the test for linear algebra, say, dense or sparse matrix Ax=B solvers with AVX2 and AVX512 and run them on i7-7800x. This would be equivalent to 20-25 GHz and if you don't use AVX then 50 GHz your regular processor if AVX512 will succeed. This is like driving 500 mph car! Here is the same test without AVX

Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1031

PostPosted: Sun Nov 11, 2018 1:42 pm    Post subject: Reply with quote

It is easy to draw incorrect conclusions from such benchmarks. In particular, did all the results come from PCs that were identical in all respects (including air temperature, fan speed, etc.) except the CPU model? What part of the benchmark code is able to benefit from AVX512?

The i9-7980XE does have AVX512 (2 units, in fact). Who would pay $1,700 for a chip that did not have better capabilities than a $200 chip (such as an i5-8400)?

There was an interesting thread in the Intel Fortran forum, where one of the senior members benchmarked changing the text of the King James Version of the Bible, all 4.5 MB of it, to uppercase from normal mixed case. He presented AVX code that did the conversion 500 times faster than a routine table look up (a->A, b->B, etc.), on the same AVX-capable CPU.

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/757222#comment-1918984

Without the right software, simply buying a hot new CPU may not give spectacular performance.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1879
Location: South Pole, Antarctica

PostPosted: Sun Nov 11, 2018 3:53 pm    Post subject: Reply with quote

Is this what FTN95 doing in one single line of Fortran text?

Code:
call upcase@ (text)
Smile

Silverfrost may look at these 2 pages of assembler code posted there to speed it up.

Is it worth asking Repeat Offender to look at linear algebra for AVX512 processors? Or just at that Anandtech benchmark, may be this speedup was not due to AVX512. Have anyone reported benefits of it with Intel linear algebra packages?
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1031

PostPosted: Sun Nov 11, 2018 6:57 pm    Post subject: Re: Reply with quote

[quote="DanRRight"]Is this what FTN95 doing in one single line of Fortran text?

Code:
call upcase@ (text)

Yes; instead of
Code:
call upcase(text)

for R.O.'s AVX routine. Since FTN95 does not support opening a file with ACCESS='STREAM', you would have to read/convert/write one line at a time, or write code to use unformatted I/O to prcess the whole text in one gulp.
R.O.'s UPCASE with one gulp is about a thousand times faster than FTN95 /64 /opt with one-line-at a time processing.

Quote:
Silverfrost may look at these 2 pages of assembler code posted there to speed it up.

Where is the demand for such work? The code would have to check processor capability and have matching codepaths (SSE2, AVX, AVX2, etc.)

Quote:
Have anyone reported benefits of it with Intel linear algebra packages?

AVX512 is not available on desktop processors, as far as I know. However, see https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/796407 .
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1879
Location: South Pole, Antarctica

PostPosted: Sun Nov 11, 2018 11:29 pm    Post subject: Reply with quote

Thanks for the info about 2019 Intel lib

BTW, the RO's two pages of assembler text is not the elegant one line call but two pages of totally incomprehensible nonsense for all 100% fortraners minus a few. Something like this below or worse. No one knows what's to do with it, no one will touch it Smile


Ones i used assembler routines with FTN95, but then one day they became useless when we switched to new compiler version.

Indeed, there was no demand to speedup this function, i used it to convert just a few letters, but may be there would be something useful here at least for marketing purposes if implementing this would not take time.

As to these specific AVX512 processors, there is nothing negative with them versus our usual desktop ones. Leaving the ones with very high core count >12-16 aside, the prices per core are similar, max clocks too, motherboards accept high end videocards, they even can play games not any slower etc. They just consume a bit more, mostly with AVX on. But there exist also huge advantages versus standard desktop ones: they have 4 memory channels and potentially can double memory bandwidth for linear algebra calculations. And they should have much larger limitations on maximum addressable RAM then 64GB being future proof.


Last edited by DanRRight on Mon Nov 12, 2018 2:53 am; edited 1 time in total
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1031

PostPosted: Mon Nov 12, 2018 1:29 am    Post subject: Re: Reply with quote

DanRRight wrote:
BTW, the RO's two pages of assembler text is not the elegant one line call but two pages of totally incomprehensible nonsense for all 100% fortraners minus a few.
You do "fasm upcase.asm" and add the OBJ that is produced to your Fortran runtime library. Now RO's upcase is a one-liner.
Quote:
Something like this below or worse. No one knows what's to do with it, no one will touch it: https://nhlife.files.wordpress.com/2015/08/aplfragment2.jpg

APL lives on; Arthur Whitney's Kdb+ is based on a derivative of APL, and is used on Wall Street, see http://code.kx.com/q/about/kxtechnology/ .
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2007
Location: Sydney

PostPosted: Mon Nov 12, 2018 5:18 am    Post subject: Reply with quote

Dan,

Thanks for the info.
I don't know which processors support AVX512. Apparently Intel are now providing this in their i9-7900X.
AVX instructions are a good way to improve performance, if the compiler supports these instructions.

The charts don't identify the type of calculation, but to get this improvement you need most calculations to take place with data in the thread's cache.
AVX512 would require a high memory transmission bandwidth, especially if combined with 20 threads. You also need a suitable algorithm !

Linear algebra packages for dense or sparse matrix Ax=B solvers would need cache smart strategies to utilise the 512 instructions and the many threads; both of which are difficult with these types of problems.
Moving to more threads also has the problem of achieving load balancing between threads, which is a problem in direct solvers.
Iterative solvers that work on localised data may be more suitable, but this is not my field.

I would expect that most general codes would struggle to show these published improvements when changing from AVX or AVX2 to AVX512 instructions.

I notice some other benchmarks don't show the same improvement; it depends on the test example.
https://cpu.userbenchmark.com/Compare/Intel-Core-i9-7900X-vs-Intel-Core-i7-8700K/3936vs3937

Thanks again,

John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group