Page 1 of 4 1234 LastLast
Results 1 to 25 of 93

Thread: PhysX analyzed on CPU

  1. #1
    Xtreme Addict
    Join Date
    Jan 2005
    Posts
    1,730

    PhysX analyzed on CPU

    David Kanter from Realworldtech analyzed how the PhysX engine from Nvidia runs on CPUs. As you may know, GPU accelerated physics are touted as the next holy grail for improving gaming experience if we were to believe the GPU makers.
    Accordingly NVIDIA claims significant improvements of 2-4x compared to running PhyisX on CPUs. But are those improvements for real ?

    You can check here to find out :

    http://www.realworldtech.com/page.cf...0510142143&p=1
    Quote Originally Posted by Heinz Guderian View Post
    There are no desperate situations, there are only desperate people.

  2. #2
    c[_]
    Join Date
    Nov 2002
    Location
    Alberta, Canada
    Posts
    18,728
    cliffs notes: PhysX not multithreaded, again... and PhysX on CPU uses X87 rather than SSE for some reason.

    x87 uses a stack of 8 registers with an extended precision 80-bit floating point format. However x87 data is primarily stored in memory with a 64-bit format that truncates the extra 16 bits. Because of this truncation, x87 code can return noticeably different results if the data is spilled to cache and then reloaded. x87 instructions are scalar by nature, and even the highest performance CPUs can only execute two x87 operations per cycle.
    Last edited by STEvil; 07-06-2010 at 10:40 PM.

    All along the watchtower the watchmen watch the eternal return.

  3. #3
    Xtreme Legend
    Join Date
    Jan 2003
    Location
    Stuttgart, Germany
    Posts
    929
    so the author tests with a tool that can not measure instructions on the gpu and wonders why he sees only cpu usage?

    maybe it works better using sse or maybe it doesnt, without proper profiling only the developers know.
    sse is not just a check box you click on and your code magically runs that instead of floating ops you actually have to change your code
    Last edited by W1zzard; 07-06-2010 at 11:07 PM.

  4. #4
    Xtreme Addict
    Join Date
    Jan 2005
    Posts
    1,730
    Quote Originally Posted by W1zzard View Post
    so the author tests with a tool that can not measure instructions on the gpu and wonders why he sees only cpu usage?

    maybe it works better using sse or maybe it doesnt, without proper profiling only the developers know.
    sse is not just a check box you click on and your code magically runs that instead of floating ops you actually have to change your code
    Hmm...no. You can pick either the CPU or GPU to handle physics. Same as with games engines which also have a SW renderer.

    In each case, the NV control panel was set to disable hardware PhysX acceleration, and then run with VTune. For comparison, the two tests were also run with GPU accelerated PhysX. As expected, the GPU accelerated versions ran at a reasonable speed with very nice effects. However, the CPU chugged along rather sluggishly. There was a very clear difference in performance that shows the benefits of accelerating PhysX on a GPU.
    Quote Originally Posted by Heinz Guderian View Post
    There are no desperate situations, there are only desperate people.

  5. #5
    Registered User
    Join Date
    Sep 2008
    Posts
    45
    Quote Originally Posted by W1zzard View Post
    so the author tests with a tool that can not measure instructions on the gpu and wonders why he sees only cpu usage?

    maybe it works better using sse or maybe it doesnt, without proper profiling only the developers know.
    sse is not just a check box you click on and your code magically runs that instead of floating ops you actually have to change your code
    If PhysX is running optimal as a single-thread scalar floating point program, it probably wouldn't be running on a GPU.

    Also
    Nvidia already has PhysX running on consoles using the AltiVec extensions for PPC, which are very similar to SSE. It would probably take about a day or two to get PhysX to emit modern SSE2 code, and several weeks for compatibility testing. In fact for backwards compatibility, PhysX could select at install time whether to use an SSE2 version or an x87 version – just in case the elusive gamer with a Pentium Overdrive decides to try it.
    http://www.realworldtech.com/page.cf...0510142143&p=4

  6. #6
    Xtreme Legend
    Join Date
    Jan 2003
    Location
    Stuttgart, Germany
    Posts
    929
    the NV control panel was set to disable hardware PhysX acceleration
    ah.. didnt see that part.

    if they ran physx with gpu disabled, so the point of the whole article is "why doesn't physx on the cpu use sse?"
    Last edited by W1zzard; 07-06-2010 at 11:37 PM.

  7. #7
    Xtreme Enthusiast
    Join Date
    Dec 2002
    Posts
    795
    Shocking.

    gee I wonder why Nvidia's stock dropped so much this year........
    PII X6 1055T 14x272
    Gigabyte 890GX
    2x4 GB Gskill DDR3@4890
    XFX 7870

  8. #8
    Xtreme Enthusiast
    Join Date
    Nov 2009
    Location
    Bloomfield Evergreen
    Posts
    607
    I would not mind running some extra threads on CPU for something like PhysX, as no game can utilize 6 cores so far.

  9. #9
    Registered User
    Join Date
    Feb 2010
    Location
    NVIDIA HQ
    Posts
    76
    Why has it dropped? Because NVIDIA didn't optimize PhysX for SSE? So you could troll this thread with pointless off-topic drivel?


    Amorphous

    Quote Originally Posted by buff View Post
    Shocking.

    gee I wonder why Nvidia's stock dropped so much this year........
    NVIDIA Forums Administrator

  10. #10
    Registered User
    Join Date
    Nov 2008
    Posts
    72
    Metro2033 utilizes 6 cores nearly perfectly, because it's running PhysX multithreaded, it's just depending on the developer. And also Bad Company 2 and Resident Evil uses them a bit.
    Nice Review:http://www.pcgameshardware.de/aid,74...rnen/CPU/Test/

  11. #11
    Xtreme Addict
    Join Date
    Mar 2010
    Posts
    1,079
    Physx is over, more and more developers are moving to Havok for their game's physics.
    I just don't buy any game that I know will not run ok just because I don't have the right brand for one of the many componentes in my rig.


    Quote Originally Posted by AffenJack View Post
    Metro2033 utilizes 6 cores nearly perfectly, because it's running PhysX multithreaded, it's just depending on the developer. And also Bad Company 2 and Resident Evil uses them a bit.
    Nice Review:
    I don't know about Resident Evil, but Bad Company 2 does not use Physx. It actually uses Havok.

  12. #12
    Xtreme Addict
    Join Date
    Jan 2005
    Posts
    1,730
    Quote Originally Posted by W1zzard View Post
    ah.. didnt see that part.

    if they ran physx with gpu disabled, so the point of the whole article is "why doesn't physx on the cpu use sse?"
    The point of the article, as I see it, is that the best things since sliced bread ( physics on GPUs ) compared to running them on CPUs is way overrated wrts to the PhysX libraries. Basically, you cannot claim that the GPUs deliver real life physics compared to CPUs based on the PhysX engine.
    I remember quite a few powerpoints from GPU makers where they showed gains sometimes an order of magnitude more over CPUs. Are those gains for real considering the lack of optimization for CPUs?

    It can be also said that why should Nvidia bother to optimize the libraries for CPUs. True, they don't. But, everybody has a CPU of some sort and only a few have an NVIDIA GPU. If game developers want to target the mainstream, is that an incetive to use the PhysX libraries ? I don't see that happening.
    Quote Originally Posted by Heinz Guderian View Post
    There are no desperate situations, there are only desperate people.

  13. #13
    Xtreme Enthusiast
    Join Date
    Mar 2005
    Location
    Buenos Aires, Argentina
    Posts
    644
    If you are enforcing yourself to do worse than what you can actually do, the competence may look much stronger that what they really are. If using SSE Instructions may improve performance twice using the Processor, then what nVidia could advertise as a 40x increase in performance using GPU vs CPU is reduced to just 20x. They are indeed doing this on purpose to make the GPU looks stronger, as their job is to sell GPUs, not achieving decent enough performance running PhysX code on CPUs.
    Is this technique anticompetitive? Indeed. Is as much anticompetitive as when code compiled using Intel compilesr didn't enabled some optimizations if the Processor didn't returned a GenuineIntel string using the CPUID Instruction. For nVidia, recompiling the PhysX libraries to use SSE means nothing and would greatly improved CPU performance, and that is obviously what they don't want for obvious reasons.

    Way to go, PhysX hypeware.

  14. #14
    Registered User
    Join Date
    Nov 2008
    Posts
    72
    Quote Originally Posted by El Maño View Post
    Physx is over, more and more developers are moving to Havok for their game's physics.
    I just don't buy any game that I know will not run ok just because I don't have the right brand for one of the many componentes in my rig.

    I don't know about Resident Evil, but Bad Company 2 does not use Physx. It actually uses Havok.
    I just meaned that, RE and BC2 are using 6cores because of sniper_sung's post, they aren't physX games. And where do you see more developers moving to havoc? Physx and havoc have together most of the marketshare, but i don't see a movement. Physx is still used in many new games.

  15. #15
    Xtreme Addict
    Join Date
    Mar 2010
    Posts
    1,079
    Quote Originally Posted by AffenJack View Post
    I just meaned that, RE and BC2 are using 6cores because of sniper_sung's post, they aren't physX games. And where do you see more developers moving to havoc? Physx and havoc have together most of the marketshare, but i don't see a movement. Physx is still used in many new games.

    Sorry I misunderstood

    And you are right to say Physx is still used. Batman, Metro 2033...
    But I think that developers will eventually move to other ways to implement physics.
    ATi's success with the 5800 series is going to be a turning point for gaming physics.

  16. #16
    Xtreme Member
    Join Date
    Oct 2007
    Location
    Sydney, Australia
    Posts
    466
    Physx may not be everyones cup of tea but I fail to see how anyone cannot see the massive parallel processing power of a GPU vs any CPU. I only use phyx to encode movies for my iPhone or ps3 And a typical 30 min episode now takes me aprox 90 secs vs 20 mins with a CPU. Yes my CPU sucks but I've seen even i7's not get close to a gpu.

    But yeah physx for games I'm not sold. I have yet to see anything that wows me other than benchmarks.

  17. #17
    I am Xtreme
    Join Date
    Dec 2007
    Posts
    7,750
    i think a few points need to be learned

    physx has the ability to run much better on CPUs than nvidia will allow, both with multicore scaling, and better instructions
    and second, nvidia owns physx and has the right to drive it right into the ground if they damn well please.

    so my take is this. nvidia needs to stop with the marketing bull-#$&% and built a superior form of physic calculation for both cpu and gpu so that no one will even want havoc or bullet. how hard is it for them to push the cpu a little harder, need i point out the other thread that most games are leaving us with oodles of ghz to play with. and then even on top of that nvidia wants to sell more powerful and more expensive gps as add in cards for physx, so make us need them. show us a game where we cant stop playing cause of how immensely real it feels.

  18. #18
    Xtreme Enthusiast
    Join Date
    Sep 2004
    Posts
    650
    I've been playing Mirror's Edge again and had to turn off PhysX, every time there was physics stuff my fps dropped to single digits on my pc..

    wtb Physx cpu emulator
    [SIGPIC][/SIGPIC]
    TJ07BW | i7 980x | Asus RIII | 12Gb Corsair Dominator | 2xSapphire 7950 vapor-x | WD640Gb / SG1.5TB | Corsair HX1000W | 360mm TFC Rad + Swiftech GTZ + MCP655 | Dell U2711

  19. #19
    Xtreme Cruncher
    Join Date
    Jun 2006
    Posts
    6,215
    How hard is it for NV to vectorize the PhysX code instead of using x87 legacy instructions? Does it have anything to do with precision required?I reckon it has.
    MultiThreading support ,on the other hand should be easier to implement and any modern Quad Core,or even better Six core chip,could run the PhysX optimized titles much better than today.

  20. #20
    Xtreme Cruncher
    Join Date
    May 2009
    Location
    Bloomfield
    Posts
    1,968
    Quote Originally Posted by informal View Post
    How hard is it for NV to vectorize the PhysX code instead of using x87 legacy instructions? Does it have anything to do with precision required?I reckon it has.
    MultiThreading support ,on the other hand should be easier to implement and any modern Quad Core,or even better Six core chip,could run the PhysX optimized titles much better than today.
    turning on sse is easy. vectorizing and optimizing can be hard especially with organizing memory in 16B alignments. there are a bunch of techniques like SOA, AOS and AVX will support scatter/gather.

    btw, you should read the page of the article "why x87?". double precision isn't needed.

  21. #21
    Xtreme Cruncher
    Join Date
    Jun 2006
    Posts
    6,215
    Quote Originally Posted by Chumbucket843 View Post
    turning on sse is easy. vectorizing and optimizing can be hard especially with organizing memory in 16B alignments. there are a bunch of techniques like SOA, AOS and AVX will support scatter/gather.

    btw, you should read the page of the article "why x87?". double precision isn't needed.
    Yeah ,I got to the "profiling results" page,haven't seen the why page that explains the precision.Thanks.

  22. #22
    Xtreme Addict
    Join Date
    Oct 2007
    Location
    Chicago,Illinois
    Posts
    1,182
    Well physx has to be as accurate as possible so More precision is better,I wouldn't trade accurate results for faster results ever,I repeat EVER.



  23. #23
    Xtreme Legend
    Join Date
    Jan 2003
    Location
    Stuttgart, Germany
    Posts
    929
    Quote Originally Posted by Hell Hound View Post
    Well physx has to be as accurate as possible so More precision is better,I wouldn't trade accurate results for faster results ever,I repeat EVER.
    then you shouldn't use a computer. it only works because it trades accurate results for faster results

  24. #24
    Xtreme Enthusiast
    Join Date
    Dec 2009
    Posts
    591
    Quote Originally Posted by Hell Hound View Post
    Well physx has to be as accurate as possible so More precision is better,I wouldn't trade accurate results for faster results ever,I repeat EVER.
    That doesn't make any sense. x87 supports max 80bit but because physx runs on g80 and agia ppu, which are both single precision 32bit, means its already running with inferior precision.

    I don't even know the point of this argument. the article linked is highly technical in nature and raises more questions than it answers old ones.

    Nvidia made a decision to adopt PhysX, good for them. Now they realize this won't get them very far, so in an effort to protect their investment they do silly things only a bozo would do, ie recompile api with x87 instructions. They will resist, but even they know it is a matter of time before it fades away.

  25. #25
    Xtreme Addict
    Join Date
    Mar 2010
    Posts
    1,079
    Quote Originally Posted by Loque View Post
    I've been playing Mirror's Edge again and had to turn off PhysX, every time there was physics stuff my fps dropped to single digits on my pc..

    wtb Physx cpu emulator


    Mirror's Edge was a great Physx fiasco.
    The game is simply unplayable when you break glass, and you are actually lucky to get frames per second instead of seconds per frame.

    But then, DICE was involved in this game...
    If you die and you restart from a load point, all the glass you broke from then is still in the floor, asking for CPU time.

Page 1 of 4 1234 LastLast

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •