Stockfish haswell optimized build

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: Stockfish haswell optimized build

Post by phenri »

syzygy wrote:I have measured. It gains you nothing.
Indeed, in the current situation you're right.
syzygy wrote:If it gains you anything, I can understand. If it gains you nothing, I do not understand.
So you just want to make life difficult for people with older hardware?
What is the problem, this kind of inconvenience can be overcome by the Makefile and his profiles like for bmi2.
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: Stockfish haswell optimized build

Post by BBauer »

Looks good.
Thank you.
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Stockfish haswell optimized build

Post by syzygy »

phenri wrote:
syzygy wrote:I have measured. It gains you nothing.
Indeed, in the current situation you're right.
syzygy wrote:If it gains you anything, I can understand. If it gains you nothing, I do not understand.
So you just want to make life difficult for people with older hardware?
What is the problem, this kind of inconvenience can be overcome by the Makefile and his profiles like for bmi2.
So edit the makefile!
Apparently that is too much trouble for you. Instead, you want Marco to do it fo you, which would make the Makefile less useable for other people. It would still gain you nothing.

In case you propose a Makefile with 100 profiles... imagine the confusion. The current profiles are necessary to switch on/off the use of certain hardware features such as native popcount that is not available on all processors. It does not make sense to go further. It's easy enough for you to do a simple edit. (But go ahead, submit a patch and see what Marco says.)
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: Stockfish haswell optimized build

Post by phenri »

syzygy wrote:
phenri wrote:
syzygy wrote:I have measured. It gains you nothing.
Indeed, in the current situation you're right.
syzygy wrote:If it gains you anything, I can understand. If it gains you nothing, I do not understand.
So you just want to make life difficult for people with older hardware?
What is the problem, this kind of inconvenience can be overcome by the Makefile and his profiles like for bmi2.
So edit the makefile!
Apparently that is too much trouble for you. Instead, you want Marco to do it fo you, which would make the Makefile less useable for other people. It would still gain you nothing.

In case you propose a Makefile with 100 profiles... imagine the confusion. The current profiles are necessary to switch on/off the use of certain hardware features such as native popcount that is not available on all processors. It does not make sense to go further. It's easy enough for you to do a simple edit. (But go ahead, submit a patch and see what Marco says.)


I see that it is a national sport for you to extrapolate fully everything? Or is it just a form quite pronounced egocentricity?
What is far too subtle for you to understand a simple remark about SSE3? Do not try to seem more ... than you already are.

This is my last response on this issue:
Intel introduced SSE3 in early 2004 with the Prescott revision of their Pentium 4 CPU.
Which did not yet support 64-bit architecture and which is 10 years old already

anachronistic, it tells you something? or it is the language that you understand?

Code: Select all

SSE3 != x86-64-modern
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: Stockfish haswell optimized build

Post by BBauer »

phenri (Paul Henri):
This is my last response on this issue:
Quote:
Intel introduced SSE3 in early 2004 with the Prescott revision of their Pentium 4 CPU.
Which did not yet support 64-bit architecture and which is 10 years old lready

anachronistic, it tells you something? or it is the language that you understand?
Code:
SSE3 != x86-64-modern

The wheel is some thousand years old.
Time to upgrade!
How old are you?
regards
Bernhard
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Stockfish haswell optimized build

Post by syzygy »

phenri wrote:I see that it is a national sport for you to extrapolate fully everything? Or is it just a form quite pronounced egocentricity?
What is far too subtle for you to understand a simple remark about SSE3? Do not try to seem more ... than you already are.
I have been explaining myself very clearly. About four or five times.
I explained that if you change sse3 into sse4.2, there will be no speed up for you and there will be trouble for other people.

For me that is quite convincing. The only response you have been giving so far is "sse3 is old, it should be changed to sse4.2".
This is my last response on this issue:
Intel introduced SSE3 in early 2004 with the Prescott revision of their Pentium 4 CPU.
Which did not yet support 64-bit architecture and which is 10 years old already

anachronistic, it tells you something? or it is the language that you understand?

Code: Select all

SSE3 != x86-64-modern
There exist Intel and AMD x86-64 processors that do not support SSE4.2. In particular there are AMD processors that have popcount but not SSE4.2. There are still people using these processors.

That SSE3 was introduced 10 years ago is completely irrelevant. The point is that not everybody has SSE4.2.

Why do you want to make trouble to people that still use older hardware? When at the same time this does not gain you any speed up anyway?

Can you explain this?

I have been very clear, but you just go on "it should be changed". You have no arguments. You do not give the impression that you have attempted to understand the issue.

Have you asked Marco already?
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Stockfish haswell optimized build

Post by syzygy »

Maybe this is what you do not realise:
x86-64-modern = popcount.

Although this is what started your continuing complaints:
phenri wrote:Why in the makefile, POPCNT comes with the flag -msse3 instead of -msse4.2 while POPCNT is present only for architectures with a minimum SSE4.2.
Btw, I am not deciding on what is in the Makefile. I simply explained that it makes sense. For you to understand it, or not. And you can always direct your complaints to Marco, who does decide. Or just edit your Makefile...
Last edited by syzygy on Thu Apr 10, 2014 9:14 am, edited 1 time in total.
Terry McCracken
Posts: 16465
Joined: Wed Aug 01, 2007 4:16 am
Location: Canada

Re: Stockfish haswell optimized build

Post by Terry McCracken »

j_romang wrote:Hello,
I just tried to make a haswell optimized build : https://www.dropbox.com/s/ghbs1vw18q6q4 ... 8_bmi2.zip
Thanks to Ronald de Man's code, I implemented BMI2 instructions in stockfish. This build also supports his syzygy's tablebases.
Please tell me if it works, you should have a ~4% speedup with the corresponding abrok.eu version. Of course you need a Haswell processor to run it !
Please note that this is NOT an official build, but just an experiment :wink:
Guys, make Stockfish a uci engine that can be used without any fuss in any GUI or better make it a GUI and everyone will come knocking for it.

Arena is way too buggy!
Terry McCracken
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Some numbers

Post by BBauer »

Here a comparison for a small system.
Aspire E1-522 AMD Quad-Core Processor A6-5200 (2.0 GHz) 8Gb

Stockfish_14040822_x64_modern_sse42:
30/34 05:05 508.164k 1.663k +0,21 d2-d4 Sg8-f6 c2-c4

Stockfish_syzygy_14040822_x64_modern_sse42:
30/42 10:01 988.902k 1.644k +0,23 d2-d4 d7-d5 Sg1-f3

My native compile St-test 4 GB hash, version from 09.04.2014:
Options -fno-exceptions -fno-rtti -fno-tree-pre -march=native -O3
30/35 07:26 843.637k 1.888k +0,19 d2-d4 d7-d5 Sg1-f3

So the native compile gives a 10% speedup.

Kind regards
Bernhard
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Some numbers

Post by zullil »

BBauer wrote:Here a comparison for a small system.
Aspire E1-522 AMD Quad-Core Processor A6-5200 (2.0 GHz) 8Gb

Stockfish_14040822_x64_modern_sse42:
30/34 05:05 508.164k 1.663k +0,21 d2-d4 Sg8-f6 c2-c4

Stockfish_syzygy_14040822_x64_modern_sse42:
30/42 10:01 988.902k 1.644k +0,23 d2-d4 d7-d5 Sg1-f3

My native compile St-test 4 GB hash, version from 09.04.2014:
Options -fno-exceptions -fno-rtti -fno-tree-pre -march=native -O3
30/35 07:26 843.637k 1.888k +0,19 d2-d4 d7-d5 Sg1-f3

So the native compile gives a 10% speedup.

Kind regards
Bernhard
Not sure how you measured "speed" here, but a 10% gain is about what I get by tweaking the makefile in a way similar to what you did.