Hacker News new | comments | show | ask | jobs | submit login
AFDS11: Microsoft Announces C++ AMP, Competitor to OpenCL (pcper.com)
22 points by johnrdavisjr 2232 days ago | hide | past | web | 24 comments | favorite



I don't know if it's accurate to say this is a competitor to OpenCL. We don't have full details, but I wouldn't be surprised if this was implemented using OpenCL. OpenCL is relatively low-level. It's quite un-friendly for developers to use directly. It's much more reasonable for compilers to generate it, or for libraries to build abstractions on top of it.

My dissertation work did a similar with with OpenMP-like syntax and semantics built on top of the Cell's native API: http://people.cs.vt.edu/~scschnei/cellgen/ (And, actually, my compiler generated code for a library that was a thin wrapper on top of the Cell's native API itself - it's so low-level that it was easier to have another layer of abstraction between my generated code and it.)


OpenCL is a language designed for writing programs where performance is important. I'm not sure how you could abstract away from it or compile down to it without losing some control over the code's performance characteristics.

A compiler would be better off compiling directly to either native code (if running on a CPU) or something like PTX (for NVidia GPUs).


You'll probably lose some performance, but you can also make disproportionately large productivity gains. Performance loss generally isn't the largest limitation, but rather expressivity. That is, by providing higher-level abstractions, you're also saying "this is how you need to write your computations." In other words, you define a programming model. If the problem you want to solve does not cleanly map to that programming model, then you can't use it.

We've been playing this game every since Fortran was first invented. Yeah, you probably could get better performance if you wrote your application one level of abstraction lower, but once you get a sufficiently sophisticated compiler, the performance benefit is marginal compared to the programming time and effort. Further, libraries tend not to be written directly in assembly, and will often rely on other libraries. I could see implementing something similar to what MS showed purely as a C++ library.


MS doesn't do OpenCL; don't you mean you're not surprised if it's implemented using DirectCompute?


"another option with the full weight of Microsoft behind it"

Well, thank goodness for that. There was me thinking it might be a temporary project to grab some developer mindshare to be dumped in a couple of years.


Time will show if this statement will be true.

They've put weight on Silverlight as well and now they're ditching it for HTML5.


Not entirely true. They are ditching it as a java write-once, run-everywhere for the web platform. Windows Phone 7 relies heavily on it/WPF. And in a corporate environment where everyone will be running IEx, it makes sense to develop applications in it.


Just when I thought Microsoft had finally seen the virtue of contributing to an existing standard instead of being different just for the sake of being different. Surely the software industry as a whole would be better off if Microsoft instead threw its weight into fixing whatever is wrong with OpenCL.


    Just when I thought Microsoft had finally seen 
    the virtue of contributing to an existing standard
What are you saying? They have been "contributing" to standards since they were founded.

Of course, not when they can force their own standard down on people's throats and get away with it, like they did with Direct 3D, which eventually won (on Windows anyway), but if you are talking about HTML5, remember that they tried their luck with Silverlight first.


Examples are indeed thin on the ground but they do seem finally to me making a serious effort to produce a standards-compliant browser. Maybe I just want to find something nice say about an old, toothless bully.


I completely agree with you but I think its okay that Microsoft builds a competitor to OpenCL. Would OpenGL improved as fast without DirectX? Little competition never hurts, lets just hope they don't push it into a monopoly.


I agree. Microsoft's childish attitude towards reinventing the wheel and hijacking ownership is adversely affecting progress in technology.


> the software industry as a whole would be better off if […]

Ultimately, Microsoft could be better of if they manage to impose their new proprietary wannabe de-facto standard. It doesn't care if it wrecks the whole industry in the process, they care about money.


Sure, that's been their M.O. since the beginning. But I thought I saw inklings of understanding there that maybe they could do just as well being the best implementor of a shared standard, growing the industry for everybody in the process. Too bad they still seem to see everything as a zero-sum game.


Ugh, I came into contact with Business Bullshit today where my manager didn't want to warn our customers after we found that one of our sites was installing malware on their computers because it could hurt profits.


True, why not utilize OpenCL but invent another alternative?


OpenCL is equivalent to OpenGL -- runs on Windows, Linux, etc. (even coming to smartphones soon).

C++ AMP is based on the DirectCompute APIs in DirectX 11.

My $.02 -- maybe the target audience for C++ AMP is different than the target audience for OpenCL. Before it was released, I really liked the idea of OpenCL but in practice it doesn't really deliver very well (performance-wise) compared to alternatives like nVidia CUDA, AMD APP (formerly Stream), and DirectCompute.


what? i've seen no performance difference between CUDA and OpenCL (targeting NVidia hardware). they are so low level and so similar that it's hard to see how there can be differences. what are you referring to?


The problem is this -- go ahead and take that OpenCL code and run it on some non-nVidia hardware. For any reasonably complex code, it turns out that you really need to optimize specifically for whatever hardware you're running on. So, while you may be using a standardized API, you still have to write specific versions of your code for each platform that you want to get the best performance on.

IMO, developers would rather write against a non-standard API (a la C++ AMP) that ran at a consistently good performance level across all of their targets (nVidia/AMD/Intel GPUs, multicore CPUs, etc.).


I've seen papers where the author seemed to do a respectable job of benchmarking and usually CUDA came out 10% to (rarely) 40% faster. Still not enough of a gain to prompt me to marry a hardware-vendor-specific language.

I think people like CUDA because Nvidia puts a serious effort into their development tools and Marketing. That's not meaningless.


Because that would make it easier to port things away from Windows.


This isn't something that fell out of a tree yesterday. They have been working on this for a while, more than likely since before OpenCL looked like it was going to take off. In fact they already ship a GPU compute API as part of DirectX(compute shaders). My guess is they are just pulling that out of DirectX to make a stand alone project.


wow didn't i just see AMD's announcement of OpenCL?


No, OpenCL's been out for a while now. AMD just announced they were releasing a new set of developer tools for OpenCL.

http://news.ycombinator.com/item?id=2660904




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: