Dolphin, the GameCube and Wii emulator - Forums

Full Version: How to build/optimize for Haswell (AVX2) ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello,

I am pretty new to dolphin and just upgrded my old HTPC from a AMD X2 215 to a i3 4130 which should perform three times faster than my old cpu (I hope).
Now I'm thinking about to build my own dolphin binary optimized for the 4th gen Intel Core-i cpu.

My os is Kubuntu 14.04 with gcc 4.8.2. I would even be willing to update to gcc 4.9 which supports AVX2 if that offers some advantages.

Can someone give me a tip what to consider to build an optimized binary for this specific cpu?

ty
i believe AVX2 or any other CPU instructions have to be coded into the emulator by the developers.
Ok, but why is Haswell that much faster than an Ivy CPU f.e.? I always thought thats because of the newer/better/optimized instruction set(s).

Can I do something to build a more optimized binary or does cmake already take care of all optimization steps?
Haswell's faster because it's faster. That's the long and short of it.
So all I have to do is to build dolphin like described here and no need to set custom compiler flags to get better performance with my system or use gcc 4.9 which supports AVX2 instead of 4.8.2?
-march=haswell or native is the cflag you want, but I wouldn't know how exactly to go about adding that on Linux.
(06-16-2014, 05:40 PM)lamedude Wrote: [ -> ]-march=haswell or native is the cflag you want, but I wouldn't know how exactly to go about adding that on Linux.

Quote:Optimizations: Edit CMakeLists.txt and replace add_definitions(-msse2) with add_definitions(-march=native -O3 -fno-stack-protector -pipe -g)

Runs smoother now than the pre-built binary.
Will support for Haswell be added to the official builds as well?
it would be interesting if you posted the same dolphin sources built with normal settings and then with march=haswell. I have a very hard time believing it really "runs smoother".
(but if it's true, I'd like to know why).
(06-17-2014, 05:11 AM)shuffle2 Wrote: [ -> ]it would be interesting if you posted the same dolphin sources built with normal settings and then with march=haswell. I have a very hard time believing it really "runs smoother".
(but if it's true, I'd like to know why).

I ran the official benchmark to figure out whether disabling HT in the BIOS/EFI settings makes any difference or not.

Here are the results:
@march=native (core-avx2) and O3

HT ON:
12min50sec
http://i.imgur.com/UIDCAxc.jpg

HT OFF:
9min32sec
http://i.imgur.com/k9Ong2p.jpg

A speedup of ~25% !


Bench results with default build settings of same source will follow.

Edit:
You were right. There is absolutely no difference.

@default build settings with HT off
9min35sec
http://i.imgur.com/096BImh.jpg
Pages: 1 2 3