Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: The E on September 13, 2013, 01:50:54 pm

Title: AVX Builds
Post by: The E on September 13, 2013, 01:50:54 pm
To add to our ever-increasing collection of TLAs and ETLAs, I give you: AVX.

For those that do not know, AVX is the latest iteration of special instructions to speed up vector calculations, like SSE and its derivatives before.
One very important note: Since AVX is comparatively new, these builds are NOT XP-compatible, and require at least:

-Windows 7
-Intel Sandy Bridge or later
-AMD Bulldozer or later

Please test these for the usual things, but especially test them for performance compared to SSE2 builds. These builds are based on SVN rev 9786.

http://blueplanet.fsmods.net/E/FSAVX.7z
Title: Re: AVX Builds
Post by: Cobra on September 13, 2013, 03:06:56 pm
Sandy Bridge is second-gen, right?
Title: Re: AVX Builds
Post by: Dragon on September 13, 2013, 04:12:04 pm
Would they work on Vista, or is Windows 7 an absolute minimum?
Title: Re: AVX Builds
Post by: The E on September 13, 2013, 04:31:24 pm
7 is the absolute minimum.
Title: Re: AVX Builds
Post by: Trivial Psychic on September 13, 2013, 05:02:44 pm
I'm packin' a Phenom-II X2, so I'm out.
Title: Re: AVX Builds
Post by: Veers on September 13, 2013, 08:37:13 pm
On the Blade Itself, I get a low of about 42fps on 3.7 release, and about 46-48fps on the AVX. Normally sits on about the 58-60fps mark anyway.

Otherwise, any specific way to record the performance between the two builds?
Title: Re: AVX Builds
Post by: Macfie on October 14, 2013, 07:59:20 pm
I notice a slight improvement with the AVX build.  I pretty much get the max frame rate (120FPS) with just about everything but what I've noticed is I get less warnings that FSOPen is maxing out a processor and the warning number has gone from being around 100% to 97%.  Any chance of starting to see AVX builds in the nightlies?
Title: Re: AVX Builds
Post by: Cobra on October 14, 2013, 09:20:45 pm
Eh, but these are only compatible with second-gen and higher i-series processors, I believe. I think the amount of i3/5/7 users here are a minority.
Title: Re: AVX Builds
Post by: Kobrar44 on October 15, 2013, 06:53:29 am
Eh, but these are only compatible with second-gen and higher i-series processors, I believe. I think the amount of i3/5/7 users here are a minority.

http://www.hard-light.net/forums/index.php?topic=85616.0 (http://www.hard-light.net/forums/index.php?topic=85616.0)

Yeah, 40% is lesser than 50, so technically..
Title: Re: AVX Builds
Post by: Luis Dias on October 15, 2013, 08:28:37 am
AVX is the new SSE2 :D

This is great The_E! More performance for free!
Title: Re: AVX Builds
Post by: Phantom Hoover on October 15, 2013, 09:10:57 am
The gains here seem pretty marginal though.
Title: Re: AVX Builds
Post by: The E on October 15, 2013, 09:31:01 am
As are the gains between no SSE and SSE, and SSE and SSE2. Sure, they're marginal, but that's pretty good for something that requires basically no effort.
Title: Re: AVX Builds
Post by: Luis Dias on October 15, 2013, 09:31:10 am
42 pfs to 46-48 (according to Veers) is more than 10% increase in performance. Nothing to sneer at.
Title: Re: AVX Builds
Post by: ChaosityZ on October 15, 2013, 09:50:36 am
I didn't know there was a hardware survey back in September until I saw the link posted above.  I don't normally view the Gaming Discussion forum.  I have now added my hardware entries into the poll.

Maybe you should re-advertise that poll in a few different areas to get a greater participation from more HLP readers?

The Core series processors are out there more than you might think.  True, many are probably 1st generation.  I just recently upgraded to a Sandy Bridge myself.  (Core i5 2400)  But, we might be surprised how much support for AVX we have today and don't realize it yet.  Even a marginal gain is still good, and might be worth adding an AVX build to the nightlies soon.  I believe SSE2 is currently the "standard" build right now?
Title: Re: AVX Builds
Post by: Luis Dias on October 15, 2013, 09:59:31 am
Yes.
Title: Re: AVX Builds
Post by: Phantom Hoover on October 15, 2013, 10:13:47 am
As are the gains between no SSE and SSE, and SSE and SSE2. Sure, they're marginal, but that's pretty good for something that requires basically no effort.

It does require differentiating between builds in a way which doesn't needlessly confuse the average user, though.
Title: Re: AVX Builds
Post by: Luis Dias on October 15, 2013, 10:48:58 am
That is not a problem. SEE builds already "taught" the community on that one.
Title: Re: AVX Builds
Post by: chief1983 on October 15, 2013, 12:03:01 pm
So we would have No SSE, SSE, Standard (SSE2), and AVX.  I still feel like 'standard' being a moving target is going to be confusing to many, but at least it hopefully gets the majority of users using a build that works for them and has the best performance.
Title: Re: AVX Builds
Post by: Luis Dias on October 15, 2013, 12:07:02 pm
I really could not be more happy having the trouble of going to check if my PC has AVX if that means better performance.
Title: Re: AVX Builds
Post by: Fury on October 15, 2013, 02:05:20 pm
So we would have No SSE, SSE, Standard (SSE2), and AVX.  I still feel like 'standard' being a moving target is going to be confusing to many, but at least it hopefully gets the majority of users using a build that works for them and has the best performance.
In the HLP survey poll SSE has 1.2 %, SSE2 8.33%, SSE3 44% and AVX 46.4% share of total votes associated with CPU choices. I would suggest making either SSE3 or AVX the next standard build and dropping SSE2 builds, leaving SSE as the last bastion for legacy CPU's. That would leave us with AVX, SSE3 and SSE builds.
Title: Re: AVX Builds
Post by: The E on October 15, 2013, 02:11:10 pm
There are no SSE3 builds, so only SSE and AVX would be offered, and I would actually just cut out SSE, given that that will be usable by the most people.
Title: Re: AVX Builds
Post by: Fury on October 15, 2013, 02:17:49 pm
There are no SSE3 builds currently, but nothing stops from compiling them. All modern CPU's support SSE3 but not necessarily AVX, which would make SSE3 strong candidate for a standard build. Both SSE2 and SSE are in the minority now, but if SCP wants to keep some form of legacy support, then dropping SSE2 is the better choice IMO.
Title: Re: AVX Builds
Post by: chief1983 on October 15, 2013, 02:42:42 pm
If I recall, enabling SSE3 support was more difficult than how we've done it for SSE and SSE2 support in the MSVC project files, but I could be wrong.  Otherwise I'm surprised no one has done it yet.
Title: Re: AVX Builds
Post by: Mongoose on October 15, 2013, 03:35:21 pm
I'd rather we at least kept SSE2 if we're not able to get SSE3 enabled, since then all of us who don't support AVX will get as much of a performance boost as possible.  Considering just how ancient SSE-only processors are, I can't imagine any people still using them don't have some sort of newer hardware available.
Title: Re: AVX Builds
Post by: The E on October 15, 2013, 03:59:39 pm
There are no SSE3 builds currently, but nothing stops from compiling them. All modern CPU's support SSE3 but not necessarily AVX, which would make SSE3 strong candidate for a standard build. Both SSE2 and SSE are in the minority now, but if SCP wants to keep some form of legacy support, then dropping SSE2 is the better choice IMO.

Except that the only reason we have support for those instruction sets is because the msvc compiler can automatically optimize for them. SSE3 is not supported in that regard, we would have to write that by hand.

So, dropping SSE2 makes exactly no sense.
Title: Re: AVX Builds
Post by: pecenipicek on October 15, 2013, 04:46:33 pm
for the record, all 64 bit processors support SSE2 at a minimum.
Title: Re: AVX Builds
Post by: Fury on October 15, 2013, 10:45:41 pm
There are no SSE3 builds currently, but nothing stops from compiling them. All modern CPU's support SSE3 but not necessarily AVX, which would make SSE3 strong candidate for a standard build. Both SSE2 and SSE are in the minority now, but if SCP wants to keep some form of legacy support, then dropping SSE2 is the better choice IMO.

Except that the only reason we have support for those instruction sets is because the msvc compiler can automatically optimize for them. SSE3 is not supported in that regard, we would have to write that by hand.

So, dropping SSE2 makes exactly no sense.

I didn't know that. I've only looked up GCC compiler options since that's what I intend to use, and it supports all of them starting from MMX to all the way to AVX2 and AVX512. I assumed MS compiler would have the same, but apparently that is not the case unless 2013 changes that.

Doesn't chief use GCC or something equivalent to build official SCP builds anyway, so what is the problem?
Title: Re: AVX Builds
Post by: The E on October 16, 2013, 01:46:00 am
No, the official windows builds are made using MSVC.

Also, have you looked at what SSE3 actually does? There isn't a lot of new functionality in there that is relevant to us. The new functions of SSE3 are mostly just variants of functions already introduced in SSE and SSE2; if the jump from SSE to SSE2 was marginal, the jump from SSE2 to 3 would be even more so. It is pretty safe to skip SSE3 unless you have a really specific need for it, which as far as I can tell we don't.
Title: Re: AVX Builds
Post by: ChaosityZ on October 17, 2013, 04:47:22 pm
I would hate for the nightly crew to have to do extra work to create additional build versions.  Based on these discussions (and Wikipedia), we don't need a SSE3 build as it is more complicated and offers no benefit. Based on the poll, we really don't need SSE anymore.
To keep the nightly process as simple as possible, should we just move forward with only these three builds?:
No-SSE
SSE2  (standard)
AVX
Title: Re: AVX Builds
Post by: chief1983 on October 17, 2013, 04:53:08 pm
I plan on moving to MSVC2012 soon, which is where support for these builds would be added.  Once done, making nightlies of them is merely a matter of editing the configuration line on the build machine that tells it which project configurations to build and release each night.  Someone else needs to actually make an AVX configuration in the 2012 project though, or I'll try to figure out how when I get 2012 installed.
Title: Re: AVX Builds
Post by: The E on October 18, 2013, 08:06:14 am
I already did this several revisions ago :P