NVIDIA Sheds Light On Lack Of PhysX CPU Optimizations - HotHardware

NVIDIA Sheds Light On Lack Of PhysX CPU Optimizations

0 thumbs up
We spoke to NVIDIA regarding the state of their PhysX SDK and why Kanter's evaluation shows so little vectorization. If you don't want to dig through all the details, the screenshot below from The Incredibles summarizes NVIDIA's response quite well.


We're not happy, Dave. Not. Happy.

Those of you who want a more detailed explanation, keep reading:

PhysX Evolution
In 2004, Ageia acquired a physics middleware company named NovodeX. Back then, what we now call PhysX was a software-only solution, similar to Havok. Ageia's next step was to build a PPU (Physics Processing Unit) that could accelerate PhysX in hardware. This hardware-accelerated version of the SDK was labeled Version 2, but while it added PPU acceleration, the underlying engine was still using NovodeX code. According to the former Ageia employees still on staff at NVIDIA, NovodeX had begun building the original SDK as far back as 2002-2003.

By the time NVIDIA bought Ageia in 2008, the company had already ported PhysX to platforms like the XBox 360 and the PS3. NVIDIA's first goal was to port PhysX over to the GPU and it logically focused its development in that area. According to NVIDIA, it's done some work to improve the SDK's multithreading capabilities and general performance, but there's a limit to how much it can do to optimize an eight-year-old engine without breaking backwards compatibility.

Why The Timeline Matters:
If we accept NVIDIA's version of events, the limitations Kanter noted make more sense. Back in 2002-2003, Intel was still talking about 10GHz Pentium 4's, multi-core processors were a dim shadow on the horizon, and the a significant chunk of gamers/developers owned processors that didn't support SSE and/or SSE2.

One thing NVIDIA admitted to us when we talked to the company's PhysX team is that it's spent significantly more time optimizing PhysX to run on the XBox 360's Xenon and PS3's Cell processor as compared to the x86 platform. As far as Cell is concerned, there's good technological reasons to do so. If you hand a Cell code that's been properly tuned and tweaked, it can blow past the fastest x86 processors by an order of magnitude. If these optimizations aren't performed, however, the Broadband Engine's throughput might make you wish for a 486.


In theory, properly optimized PhysX could make the image on the left look much more like the GPU- PhysX image created on the right.

Other factors include the fact that the majority of game development is done with consoles in mind, and the simple reason that NVIDIA wants PC users to buy GPUs because of PhysX, which does make it less interested in optimizing CPU PhysX.

Modernized SDK Under Development:
It'll be awhile, but we'll eventually find out whether NVIDIA is purposefully maintaining deprecated standards, or if the problem has more to do with the age of the company's development API. NV isn't giving out any release dates, but the company is hard at work on a new version of the PhysX SDK. Rather than trying to continually patch new capabilities into an old code base, the PhysX team is "rearchitecting" the entire development platform.

In theory, this revamp will address all of the issues that have been raised regarding x86 performance, though it may still be the developer's responsibility to use and optimize certain capabilities. Even after version 3.xx is available, we'll have to wait for games that make full use of it, but if NVIDIA's been sincere, we'll see a difference in how modern CPUs perform. 

Article Index:

Prev 1 2 3 4 5 Next
0
+ -

I usually support AMD, but I can see right through this. OF COURSE they dug up dirt on this, since it's a competitor's product! Now, I don't like nVidia's ambiguous "promote it/tie it to hardware" stance, but optimization simply doesn't work if you're developing for multiple platforms.

To answer Taylor: I think that it's not CPU optimized because although I agree that multiple cores are underutilized, a CPU has only 12 parallel processing cores at the most (here I refer to the i7-980X) but a GPU can have hundreds, making it perfect for calculating hundreds of particles (water drops, bullet casings, falling pencils, whatever). That's why I think they didn't focus on CPU optimization, and for another reason: going back to optimization for multiple platforms. What do they choose to support, Intel or AMD? And besides, like Joel said, nobody's stopping people from developing for software Physx as well, where physics calculations are built into the game/simulator engine.

0
+ -

Nether, (nice reference to Kara, btw).

 

AMD didn't commission this study. AMD has nothing to do with this study. Kanter is a person of very long standing in the tech community--his work confirms some of the facts AMD reported, insomuch as PhysX isn't optimized well for x86 CPU performance. AMD drew its own conclusions about why that is, Kanter drew his, and NVIDIA has its own explanation.

 

None of the parties in question--not AMD, not NVIDIA, not Kanter--are arguing that PhysX is fabulously well optimized for x86 CPUs. NVIDIA's position can be summarized simply in three parts:

1)  There are reasons why the numbers look the way they do.

2)  Kanter is using older projects that probably used fewer optimizations.

3)  The new code base NV will launch will make it easier to take advantage of CPU optimizations.

0
+ -

I don't buy Nvidia's response. It is not a simple case of them not wanting to optimize PhysX for the CPU, they seem to be purposely crippling it. As I understand David Kanter's original article, there is no advantage in using x87 over SSE. SSE and later iterations are much faster and easier to use, so why use x87?

 

Also, as Charlie Demerjian pointed out in his blog, today's compilers already default to use SSE in their output. If you want compiler's to output x87, to have to specifically tell it so. Of course given Charlie's obvious bias against Nvidia, you need to take this with a grain of salt, but it sounds logical given Intel and AMD deprecated x87 use years ago. Perhaps those who have experience in this can shed more light.

 

All they need is to recompile. Then Nvidia could've spent at most several weeks testing the recompiled library, according to David Kanter. And also, they could still provide the x87 version as an option during setup, in case somebody really needs it.

 

Simply put, there simply is no reason not to use SSE. If Nvidia doesn't want to optimize PhysX on the CPU, fine, I can understand that. But to use older, slower code deliberately just so that they can show PhysX is faster on their hardware by a lot is downright deceitful. Just as deceitful as disabling PhysX when there is an ATI GPU present, or disabling AA in Batman when using ATI GPU, or presenting non-functioning Fermi mockups and telling the world it's the real "puppy."

0
+ -

Thundermane,

I think you're missing part of NVIDIA's point. Remember, PhysX is a physics engine that runs in software mode (on the CPU) on virtually every platform it supports. Not optimizing for x86 code probably was a business decision, but the SDK itself isn't/wasn't designed to take full advantage of SSE when it was written 5-6 years ago.

Do I think there's probably more NV could do with its existing SDK?  Yes. Do I think there's a legitimate business reason why the company prioritized Cell and XBox 360 development over PC development? Absolutely. It's not just the fact that the majority of games are console games, it's the nature of the beast. Consoles are much more difficult to program; it's harder to get high performance out of them.

Making fundamental changes to the way a program multithreads or evaluates SIMD instructions is a complex process that could easily break backwards compatibility. I think we'll know a lot more once the new SDK is out.

0
+ -

"The best way to encourage people to buy NVIDIA GPUs is to ensure that the special effects are amazing and only available to NVIDIA customers. Optimizing PhysX to run on an x86 CPU potentially dilutes the attractiveness of an NVIDIA GPU,"

______________________________________________

My belief is that the best way to get people to buy your products is to build a better product. (like the awesome new GTX460 series)

If PhysX was opened up and tweaked to take advantage of all of today's techno-advances, life would be better for us, the consumers, and much ill-feeling against NVIDIA would go away. I realize that they bought the fledgling concept in that company, but they closed it off to others and crippled it for their own benefit too. This was a lousy public relations move and has turned friends into foes.

0
+ -

Real,

You've oversimplified the situation. First, NVIDIA has spent a great deal of money "building a better product." As this article stated, the next version of CUDA will incorporate more SIMD instructions and will generally be more efficient. At the same time, as you've noted, the company has worked towards releasing better iterations of Fermi at various price points.

We know NVIDIA has sunk a lot of money into CUDA and PhysX development. We know they've sunk a ton of money into future video card designs. Yes, NVIDIA wants developers to use CUDA and PhysX, but it's not as if the GeForce series has been crippled when it comes to running DirectCompute or OpenCL.

I'm not claiming that NVIDIA's approach to hardware PhysX adoption is the best possible one--but it's quite inaccurate to paint NVIDIA as opting for FUD as opposed to real improvements.

0
+ -

I know Nvidia gets a lot of hate but c'mon lets get real here. 

1.) They own PhysX, whatever they want to do with it is ther prerogative.

2.) They aren't blocking DirectCompute and a lot of these effects can be done through that now.

3.) They aren't blocking OpenCL either and they are part of Khronos group.

4.) If there are any physics engine right now that performs as well as PhysX and is as easy to implement in game as PhysX I'd love to see it, but frankly there are none.  Truth is  Nvidia is the only company right now that is actually putting their money where their mouth is in terms of advancing Physics.  Bullet has been all but abandoned (not surprisingly), the lead guy left development and its in limbo once again, although I'm amazed at the lack of flack ATI is getting for constantly promising things and not delivering. 

5.) All other physics engines are way behind PhysX in terms of technical advancement and its going to take a long while before they all catch up if they do (except for Bullet, unless ATI invests a major amount of time and resources on it in terms of developers and not just publicists coming out every few months reminding people they are working on an Open approach that never manifests into anything tangible).

0
+ -

crowTrobot:

If there are any physics engine right now that performs as well as PhysX and is as easy to implement in game as PhysX I'd love to see it.

Havok

http://www.youtube.com/watch?v=3bKphYfUk-M

0
+ -

acarzt:

crowTrobot:

If there are any physics engine right now that performs as well as PhysX and is as easy to implement in game as PhysX I'd love to see it.

 

Havok

http://www.youtube.com/watch?v=3bKphYfUk-M

 

Well that demo actually doesn't show that it performs better than physx Stick out tongue

Granted that video is 3 years old now, but those are just basic collision physics.  More impressive would be particle manipulation to simulate water or gas for example.  The skeletal animation on that thing looks very basic too. Also since havok is made by intel, its only CPU implemented vs GPU parallelization with physx.

Best example of the current state of havok physics is probably Just Cause 2, although there are no hundreds of individually reacting physics particles in there at the same amount of time on the screen (dissappears after two seconds) like there is in something like Mafia 2 or Batman.  Even the impressive looking water in Just Cause 2 was implemented using CUDA (though not directly PhysX, it moreso shows the limitations of havok when handling fluid mechanics)

 

0
+ -

Joel H:
 Real, You've oversimplified the situation. 

I have a simple perspective. I'm not anywhere near as knowledgeable as you about this stuff. I don't know as much about this and many other things as you. I look at it as 'what I'm experiencing when I play games'. I've tried turning on PhysX with my 2GB GTX285 and my 1GB HD5850 card in both computers to no avail. it just doesn't work. So here is something that everybody's crowing about that I can't touch with either of my several hundred dollar video cards. Then I go online and read about it a little (mind that I really don't understand the technical aspects entirely) and lots of supposedly knowledgeable people are bitching that NVIDIA has crippled the technology unless you shell out big money to them, and they're trying to strong arm developers into adopting their propitiatory tech within their games. (leaving a lot of us to wonder what it looks like)

So I resent it. It's simple.

BTW: This doesn't mean that I won't buy from them. (the ultimate expression of financial love) I have my eye on a pair of those GTX460's for an SLI box. Price, performance and the inclusion of those technologies that I've been missing drive this decision.

Prev 1 2 3 4 5 Next
Login or Register to Comment
Post a Comment
Username:   Password: