OpenCL on the Fast Track

来源:互联网 发布:web science数据库 编辑:程序博客网 时间:2024/04/30 09:58

OpenCL on the Fast Track


Asfar as technology maturity goes, GPGPU (general-purpose computing ongraphics processing units) is just a baby. But there's already aneffort underway to produce an industry standard for this newprogramming model: OpenCL. With people still kicking the tires onNVIDIA's CUDA and AMD's Brook+ GPU programming languages, the effort tocome up with a vendor-independent way to access GPUs for computingmight seem premature. It isn't.


For one thing, OpenCL's ultimate purpose is broader than just GPGPU.It's real goal is to define a standard low-level API for a whole rangeof parallel architectures, including GPUs, multicore CPUs, the Cellprocessor, Larrabee, and DSPs. In fact, OpenCL stands for OpenComputing Language, which is about as broad as it gets. The standardwill impose some requirements on the hardware, such as the presence offloating-point support (which leaves out integer-only DSPs) and dynamiccontrol flow (which leaves out pure SIMD processors, like ClearSpeed*).But the fact that the OpenCL working group includes the biggest playersin chip making -- Intel, AMD, NVIDIA, IBM, Motorola, Texas Instruments,and others -- suggests that the standard will enjoy broad industrysupport.


Apple Computer initiated the work in an effort to find a way toextract computing performance out of GPUs and multicore CPUs in anarchitecture-independent way. In June 2008, the company turned over theproject to the Khronos Group, an industry consortium that develops andmaintains open standard, royalty-free APIs, primarily at the level ofthe hardware-software interface. Up until now, the consortium has beenmostly focused in the graphics and media realms. OpenGL is perhaps themost well-known API in this regard. With OpenCL, Khronos has taken on amuch more general-purpose standard.


"From the get-go OpenCL is intended to address both high-endsystems, mobile and embedded devices," explains Khronos President NeilTrevett, whose day job is VP for the embedded mobile group at NVIDIA.OpenCL could certainly be welcome news for HPC developers considering along term strategy with GPUs and other accelerators but wary aboutgetting locked into proprietary hardware or software stacks. Trevettalso sees a great deal of opportunity for OpenCL-enabled devices in thehandheld space, where the next generation of GPUs and DSP can be usedfor mobile supercomputing.


Compute-intensive applications such as image processing, augmentedreality, and location recognition are already on the drawing boards ofa number of cell phone makers. The missing piece is tapping into theGPU and DSP processors for general-purpose computing. An API standardseems especially important to this market since the hardware moves veryrapidly in the consumer handheld space. By establishing a foundationallayer, OpenCL will help preserve software investments and enableplatform independent applications and libraries to be developed.


But if OpenCL succeeds, what will become of proprietary solutionslike CUDA and Brook+? Wearing his NVIDIA hat, Trevett says his companyis fully supportive of the OpenCL effort and they're going to becareful not to set up CUDA as an OpenCL competitor. He says the twoplatforms offer essentially the same level of interface, and as far asthey're concerned, the more ways the programming community is able toget to parallel processing goodness, the better it will be for all theplayers. AMD, likewise, was an early OpenCL advocate and is committedto supporting an implementation on its "stream computing" processors.


The presence of IBM and Intel in the OpenCL working group suggeststhat implementations for Cell and Larrabee, respectively, are in theworks. Another OpenCL member, RapidMind, is looking forward to beingable to use a common API for its parallel programming platform, whichessentially offers a high-level programming environment that can belayered on top of OpenCL. According to RapidMind Chief ScientistMichael McCool, one of the nice side effects of the upcoming standardwill be to establish a minimum set of requirements for processors, suchthat new hardware will be designed with the OpenCL specs in mind.


Version 1.0 of OpenCL is currently scheduled to be released in earlyDecember at SIGGRAPH Asia 2008 in Singapore. If they succeed, that'sgot to be some kind of industry spec development record -- basicallyfrom prototype to final in 6 months. I think the IEEE study group thatwas working on the 40/100 Gbps Ethernet standards took that long justto decide on the seating arrangement. Kidding aside, I suspect therapid gestation of OpenCL has something to do with the members'motivation to get these standards in place and with the running startthe project got from Apple.


Although the spec won't be ready in time for SC08, the Khronosgroupies are presenting an OpenCL technical briefing and reception atthe event on Monday, November 17, to bring people up to speed. Ifyou're interested, check out http://www.khronos.org/news/events/detail/opencl_sc08/. Appetizers and cold beer will be provided!


*ClearSpeed reports that they do, in fact, support dynamic flowcontrol, saying they "have multiple mechanisms that enable either puredynamic flow control or predicated execution of instructions." Thecompany believes that their are no significant barriers to supportingOpenCL on ClearSpeed hardware and it is possible that the recentlyannounced CSPX API could be contributed to the OpenCL working group asa potentially very useful layer for users who wish to scale theirapplications to use multiple accelerators in a single system. AlthoughClearSpeed is not currently a member of the OpenCL working group, theyare "in the process of engaging with the Khronos Group and the OpenCLactivity," adding: "We have always endorsed the position that what theusers and suppliers of heterogeneous acceleration need is an openstandard as opposed to a proliferation of proprietary or third partysolutions."

Posted by Michael Feldman - November 4 @ 10:58AM

原创粉丝点击