OpenCL is a Bad Idea

Posted:
in macOS edited January 2014
OpenCL is a bad idea. Very bad indeed. Any OpenCL usage will suck performance away from the concurrently running 3D internet browsers or interactive 3D software products. It will make GPUs pointless, as they will constantly be having their power drained by OpenCL, such that they will not be providing a consistent level of 3D graphics acceleration.



Lets go over a few things.



(1) The point of a GPU is to provide *graphics* processing power. Why? Because frankly, 3D virtual reality applications (such as virtual worlds clients, interactive entertainment products, etc.) require EVERY OUNCE of power that they can get for the graphics to run smoothly. Ever tried to use Second Life or another similar product on a standard MacBook? Yeah, it's horrible.



(2) 3D virtual reality clients (aka 3D internet clients or browsers) are inevitably going to be the de facto standard for all internet usage.



(3) Currently, virtual reality clients such as Second Life, and high-end 3D entertainment products such as Crysis, run far better on the Windows platform (or are ONLY available on Windows) due to enhanced graphics APIs (such as DirectX 10) and developer support from Microsoft.



Despite the claims of fanboys, OpenGL's implementation on MacOS X is sub-standard in comparison to DirectX. On paper, OpenGL may appear to have similar features, but in reality, Apple's GPU drivers in MacOS X have been unstable, crashy, slow, and crappy. For example, on my MacBook Pro, for the first eight months of its existence (from June 6, 2007 to Feb. 11, 2008) a severe memory leak in the NVIDIA drivers caused constant total system freezes that required hardware power-off. Even after the Leopard Graphics Update 1.0, released on Feb. 11, the crashes stopped, but the performance gap between equivalent software running under Vista with Bootcamp on the same machine has not been addressed.



Because Apple insists on publishing all GPU drivers for its systems, companies like NVIDIA and ATI who typically write their own drivers for Windows do not publish those drivers for the Mac. Therefore, whereas on Windows the driver has been written by those who designed the GPU, the GPU itself has been designed specifically both in hardware and software for DirectX support, and there is even a fancy control panel allowing advanced users to customize all features of the GPU, on the other hand, on the Mac platform, Apple writes sub-standard drivers, updates them infrequently even when there are severe, debilitating bugs present, offers no customizability or control panels, and does not gear the OS in any way towards ensuring optimal performance of applications that rely on consistent 3D frame-rates.



However the problem extends far deeper than just graphics drivers: overall, Apple's anemic attitude towards interactive 3D platforms and their developers is the cause of this problem. You will not find a single interactive 3D development application amongst Apple's "Pro" apps (no, Motion does not count), nor will you find a single developer of this software who will tell you that Apple's support of them is good. Steve Jobs wouldn't even shell out a measly $1 million USD to bring Steam to the Mac platform. For reference, Apple made about $1 million USD *per day* in the first month of the iPhone App Store, but Steve could not spare $1 million to bring the most prolific online 3D entertainment platform to the Mac (for those who don't know, it would include arguably the most popular PC game of all time, CounterStrike).



There is no excuse for any of this. You cannot argue that "the Mac is not a gaming platform, just use Windows for that," because gaming is not just about games anymore. The computer entertainment industry dwarfs Hollywood now (many movies are mostly 3D graphics as it is), and yet somehow Apple still privileges Final Cut Pro and filmmaking, as well as music products, over 3D interactivity and development products. 3D internet clients use the same 3D physics and graphics engines as games, therefore they run like crap on the Mac since the MacOS contains very few optimizations to enhance their perormance.



The fact that 3D interactivity engines run much better on Windows means that all 3D internet browsers and clients will run better on Windows compared to the Mac, which may not seem like that big of a problem in 2008, but it is probably the main software-related factor inhibiting widespread adoption of the Mac platform, and in a few years it could severely cripple the Mac platform. The Mac could already have a much larger market share if it was a strong 3D-interactive platform, especially if Apple opened up the platform to home-brew systems or offered a more consumer-oriented tower system.



So what is Apple's answer? OpenCL? This will defeat the entire purpose of the GPU, by repurposing it as an extension of the CPU. The MacOS already provides inferior GPU performance via crappy drivers, lack of developer support, and the fact that the Aqua interface constantly uses GPU time and will not relinquish it even when another 3D program is running in a full-screen mode. OpenCL will further drain GPU performance. For example, a common thing to do for 3D content development would be to run Second Life and Photoshop at the same time (Photoshop is used for designing textures that are then uploaded to the virtual reality server to be used in 3D objects).



However, when future versions of Photoshop start relying on OpenCL, this will steal processing power away from the GPU, and thus will cripple the performance of Second Life, in this example. However, it could be far worse than that, if the OS itself relies on OpenCL, or many other programs do, it will mean that the GPU becomes no longer a GPU at all, and the Mac will become a useless platform for the 3D internet. Any OpenCL usage will suck performance away from the concurrently running 3D internet browser.



In conclusion, I would like to know WHEN THE HELL is Apple going to wake up and fix all the problems that exist with the Mac related to 3D? Where is Apple's answer to DirectX? Where is my NVIDIA Control Panel? Where is my Mac Hardcore minitower?



-=DG=-

Comments

  • Reply 1 of 8
    I never looked at OpenCL that way. From what little I have read about OpenCL, I got the impression the GPU would be used for mathematical purposes (i.e. calculations), not things like searching strings, or video/audio encoding/decoding. It does seem strange that with processors having 2, 4, and soon to be more cores, Apple would want to use a GPU as a CPU, unless OpenCL is geared more for products like the iPhone, Mac tablet, or even the MacBook Air, where increasing processor speed or the number of cores would be more of a detriment (i.e. shortened battery life) than a benefit.



    Yes, I know there is no Mac tablet but the foundation has been laid by the iPhone (touch screen), MacBook Air (battery, SSD), and iMac (minimize space between screen and logic board).
  • Reply 2 of 8
    hmurchisonhmurchison Posts: 12,425member
    Ok so you've built a premise upon the belief that OpenCL will actually harm 3D performance on Mac. Then your treatise discusses the current state of OpenGL on the mac and then you go right back to your premise as the conclusion.



    Where's the supporting evidence that the very design of OpenCL is going to have deleterious effects on 3D Mac performance. There's no data here and in it's place sits supposition.



    I want to know how taking advantage of the burgeoning power of the GPU through a parallized API is going to slow things down. We all know that moving forward the GPU will be utilized more and more but OpenCL seems to be just the type of product that would seemingly be required to efficiently take advantage of the GPU.



    http://en.wikipedia.org/wiki/OpenCL



    Quote:

    OpenCL (Open Computing Language) is a language for programming heterogeneous data and task parallel computing across GPUs and CPUs. It was created by Apple in cooperation with others, and is based on C99.



    and further strengthening Apple's position



    Quote:

    The initial OpenCL implementation is reportedly built on LLVM and Clang compiler technology.[citation needed]

    AMD has decided to back OpenCL (and DirectX 11) in favor of its now deprecated Close to Metal framework.



    OpenCL and Grand Central seem to me as the appropriate way to deliver GPU and CPU perfomance to a plehtora of applications. It would make some sense for Apple to maintain good but not great drivers as whatever OpenGL implementation they have must be linked with OpenCL by 10.6's ship date.



    Also OpenGL by itself doesn't match the breadth of DirectX but future versions should be making some radical changes.



    Apple's action is actually wise here. Rather than attempt to make a clone of DirectX via OpenGL they are "embracing and extending" via taking 3D graphics down a new path. If they've put the proper amount of resources into this endeavour then the fruits of their labor stand to be more than just bringing over Stream and other PC centric product. They stand to be at the leading edge of this new direction in 3D design and performance.



    We'll see how this all plays out but we'll need much more supporting evidence if we are to believe that OpenCL is bad for Mac. AMD clearly doesn't not agree.
  • Reply 3 of 8
    akacakac Posts: 512member
    I think your entire premise is wrong. OpenCL will be used by apps that need it and when you're using apps that need OpenCL you are *not* going to be using 3D graphics apps. And OpenCL is something that is designed primarily for scientific work. Not for checking email.
  • Reply 4 of 8
    So, Microsoft's Direct X11 is now worried about OpenGL 3.x and OpenCL I see.



    This is indeed good news, for Scientific Computing [across all fields of engineering and moreso] and 3D Real-time simulations, so on and so forth.



    I'm looking forward to getting my hands on both of them with 10.6.
  • Reply 5 of 8
    The entire rant seemed to be nothing more than a roundabout way for the poster to assert that Apple should market a mid-tower Mac.

    I'm pretty sure there's another thread fir that somewhere
  • Reply 6 of 8
    MarvinMarvin Posts: 15,322moderator
    Quote:
    Originally Posted by darkgoob View Post


    Ever tried to use Second Life or another similar product on a standard MacBook? Yeah, it's horrible.



    That's because it uses integrated graphics.



    Quote:
    Originally Posted by darkgoob View Post


    3D virtual reality clients (aka 3D internet clients or browsers) are inevitably going to be the de facto standard for all internet usage.



    Yeah 'cos every time I go to Amazon, I really want to have to take my virtual character into a 3D mall and pick items off the shelf. Nope, the internet will display information in the same way. 3D clients will be minimal.



    Even if they aren't, they just render them server-side and stream the render to you. Like this:



    http://www.techcrunch.com/2008/08/11...-in-the-cloud/



    Quote:
    Originally Posted by darkgoob View Post


    Therefore, whereas on Windows the driver has been written by those who designed the GPU, the GPU itself has been designed specifically both in hardware and software for DirectX support, and there is even a fancy control panel allowing advanced users to customize all features of the GPU, on the other hand, on the Mac platform, Apple writes sub-standard drivers, updates them infrequently even when there are severe, debilitating bugs present, offers no customizability or control panels, and does not gear the OS in any way towards ensuring optimal performance of applications that rely on consistent 3D frame-rates.



    I agree here, Apple needs to give their driver development some serious consideration and work more closely with the manufacturers. It only makes sense that the manufacturer will write better code than Apple. In fairness, the performance hit isn't staggering but it could be better and the constant driver bugs are getting tedious.



    Quote:
    Originally Posted by darkgoob View Post


    Steve Jobs wouldn't even shell out a measly $1 million USD to bring Steam to the Mac platform. For reference, Apple made about $1 million USD *per day* in the first month of the iPhone App Store, but Steve could not spare $1 million to bring the most prolific online 3D entertainment platform to the Mac (for those who don't know, it would include arguably the most popular PC game of all time, CounterStrike).



    You misspelled Half-Life 2 but it wasn't Apple's place to pay Valve $1 million for this. They could easily buy other software and bring it to the Mac, what's in it for them? If anything, you should say Aspyr didn't pay up $1 million and rightly so. That's an extortionate amount to pay for one franchise despite the popularity of it.



    Quote:
    Originally Posted by darkgoob View Post


    the fact that the Aqua interface constantly uses GPU time and will not relinquish it even when another 3D program is running in a full-screen mode.



    If it's not rendering anything, it's not using any of the GPU. The same goes if you have an OpenGL context that is sitting idle.



    Quote:
    Originally Posted by darkgoob View Post


    OpenCL will further drain GPU performance. For example, a common thing to do for 3D content development would be to run Second Life and Photoshop at the same time (Photoshop is used for designing textures that are then uploaded to the virtual reality server to be used in 3D objects).



    Point is that they won't or shouldn't be running at the same time. If you actually wanted to keep a 3D program open while using the GPU for general computing then pause the game and it won't matter. There are very few cases where you will be doing both at the same time.



    In the other thread about OpenCL ( http://forums.appleinsider.com/showthread.php?t=89701 ) I posted a link to a benchmark using the GPU for physics processing as well as rendering and at most you take a 10fps hit but it's not even that because that benchmark used a separate processor on top. Compared to using the CPU alone, it still gets a whole 20fps advantage.



    You seem to not like the idea that the GPU will choke when doing these calculations when in actual real-world cases, GPU-based computation performs better. Bear in mind, we're not talking about one CPU core where throwing two tasks at it is going to make it choke. We're talking about 30+ processors which balance whatever load they are given. If these processes were done on the CPU, the CPU might be so slow that it becomes a bottleneck so the GPU isn't being used to its full capacity.



    OpenCL is a way to use the full capacity of your hardware. Consider raytracing, to get nice results, you'd do maybe 128 raytracing steps per pixel. On a normal CPU, you'd get 3-4 threads running at the same time. Even if your clock speed is 5 times faster than a GPU core, you have 10 times more processors so you're still going to finish 2-3 times faster using the GPU and because it's optimized code, much faster in some cases. Some code has shown an order of magnitude increase.



    Quote:
    Originally Posted by darkgoob View Post


    However, when future versions of Photoshop start relying on OpenCL, this will steal processing power away from the GPU, and thus will cripple the performance of Second Life, in this example.



    You seem to place a lot of importance on Second Life. Suffice to say if they bring out new machines with good GPUs and OpenCL makes them run faster than you've ever seen, you won't complain. Your concern is based on a 'what if' rather than 'what is'. If OpenCL comes out and it's a complete let down then it's time to make the complaint but it's way too early to make that judgement now.



    Quote:
    Originally Posted by darkgoob View Post


    In conclusion, I would like to know WHEN THE HELL is Apple going to wake up and fix all the problems that exist with the Mac related to 3D? Where is Apple's answer to DirectX? Where is my NVIDIA Control Panel? Where is my Mac Hardcore minitower?



    It's too late now. We don't need these things any more. Quad core mobile computing is here now and you simply don't need more than that in a mid-tower. They can fit an 8600M GT in a laptop and that is a powerful GPU. OpenCL is the answer to DirectX because it is completely flexible so you can get completely arbitrary shading functions - at first glance the language seems to be a bit ugly for that though but I'm sure GLSL will have some improvements that tie in with OpenCL.



    If they made a Mini next week with a 2.5GHz Penryn Core 2 Duo, the option for a 7200 rpm drive or SSD is you want seriously fast performance and an 8600M GT and similar spec in the Macbook, the cries for a mid-tower would end. There may be complaints about the upgradeability but very few.
  • Reply 7 of 8
    Many GPUs will have multiple cores in the future. OpenCL is going to be needed to keep all cores busy instead of idle.
  • Reply 8 of 8
    dfilerdfiler Posts: 3,420member
    Quote:
    Originally Posted by darkgoob View Post


    So what is Apple's answer? OpenCL? This will defeat the entire purpose of the GPU, by repurposing it as an extension of the CPU.



    The purpose for and advantage of a GPU isn't that there is a separate processing unit.



    What is of significantly more importance is that the GPU is specialized. The new ones are certainly more flexible than the old, but the advantage is still that the GPU is specialized.



    You have correctly observed the slow performance of certain 3D apps in OS X. However, your assessment as to the cause, is not technically accurate.
Sign In or Register to comment.