• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 41 42 43 44 45 ... 116 Next »

How to build/optimize for Haswell (AVX2) ?
View New Posts | View Today's Posts

Pages (3): 1 2 3 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
How to build/optimize for Haswell (AVX2) ?
06-15-2014, 01:10 AM
#1
tecfreak Offline
Junior Member
**
Posts: 28
Threads: 1
Joined: Jun 2014
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
Find
Reply
06-15-2014, 01:25 AM
#2
Gir Offline
Chaotix
****
Posts: 310
Threads: 21
Joined: Mar 2012
i believe AVX2 or any other CPU instructions have to be coded into the emulator by the developers.
Find
Reply
06-15-2014, 01:37 AM
#3
tecfreak Offline
Junior Member
**
Posts: 28
Threads: 1
Joined: Jun 2014
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?
Find
Reply
06-15-2014, 02:01 AM
#4
AnyOldName3 Offline
First Random post over 9000
*******
Posts: 3,519
Threads: 1
Joined: Feb 2012
Haswell's faster because it's faster. That's the long and short of it.
OS: Windows 10 64 bit Professional
CPU: AMD Ryzen 5900X
RAM: 16GB
GPU: Radeon Vega 56
Find
Reply
06-15-2014, 02:06 AM
#5
tecfreak Offline
Junior Member
**
Posts: 28
Threads: 1
Joined: Jun 2014
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?
Find
Reply
06-16-2014, 05:40 PM
#6
lamedude Offline
Senior Member
****
Posts: 360
Threads: 7
Joined: Jan 2011
-march=haswell or native is the cflag you want, but I wouldn't know how exactly to go about adding that on Linux.
Website Find
Reply
06-17-2014, 12:42 AM (This post was last modified: 06-17-2014, 12:49 AM by tecfreak.)
#7
tecfreak Offline
Junior Member
**
Posts: 28
Threads: 1
Joined: Jun 2014
(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.
Find
Reply
06-17-2014, 03:47 AM
#8
pokemontrainer Offline
Junior Member
**
Posts: 28
Threads: 3
Joined: May 2014
Will support for Haswell be added to the official builds as well?
Find
Reply
06-17-2014, 05:11 AM (This post was last modified: 06-17-2014, 05:12 AM by shuffle2.)
#9
shuffle2 Offline
godisgovernment
*
Project Owner  Developers (Administrators)
Posts: 698
Threads: 17
Joined: Mar 2009
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).
Find
Reply
06-17-2014, 05:59 AM (This post was last modified: 06-17-2014, 06:28 AM by tecfreak.)
#10
tecfreak Offline
Junior Member
**
Posts: 28
Threads: 1
Joined: Jun 2014
(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
Find
Reply
« Next Oldest | Next Newest »
Pages (3): 1 2 3 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode