OpenCL Gains Ground On CUDA

By Michael Feldman

February 28, 2012

As the two major programming frameworks for GPU computing, OpenCL and CUDA have been competing for mindshare in the developer community for the past few years. Until recently, CUDA has attracted most of the attention from developers, especially in the high performance computing realm. But OpenCL software has now matured to the point where HPC practitioners are taking a second look.

Both OpenCL and CUDA provide a general-purpose model for data parallelism as well as low-level access to hardware, but only OpenCL provides an open, industry-standard framework. As such, it has garnered support from nearly all processor manufacturers including AMD, Intel, and NVIDIA, as well as others that serve the mobile and embedded computing markets. As a result, applications developed in OpenCL are now portable across a variety of GPUs and CPUs.

Although OpenCL 1.0 was introduced in December 2008, just a year and a half after the NVIDIA launched its first version of CUDA, OpenCL still trails CUDA in popularity by a wide margin, especially with regard to HPC. That is mostly due to a concerted effort by NVIDIA to establish CUDA as the dominant programming framework for GPU application development in this realm..

AMD has been the most vocal booster of OpenCL technology for technical computing, but it’s lack of a competitive product set for high-end GPU computing has muted that message. Thus far, OpenCL usage has been mostly relegated to client-side computing, especially for mobile platforms, which have increasingly incorporated GPU silicon into their designs. Apple, who initially developed OpenCL before handing it off to the open-standard Khronos Group, was instrumental in getting the technology off the ground.

The knock on OpenCL for HPC users has been lack of maturity, which has resulted in low performance, compared to CUDA. There is also the perception that support from the principle HPC chipmakers (Intel, AMD and NVIDIA) would be less than enthusiastic, at least for their high-end processors. In many ways, that’s still true, given that NVIDIA is devoting most of its attention to its home-grown CUDA software, while Intel seems to have settled on its own parallel programming frameworks, mainly Cilk Plus and Threading Building Blocks.

AMD though, continues to champion OpenCL, and some of their more recent compiler and library releases have improved performance considerably. In fact, Kyle Spafford, from the Future Technology Group at Oak Ridge National Lab (ORNL), has been benchmarking the two technologies for some time and is now convinced that OpenCL performance is now on par with that of CUDA. He recently presented his findings at Georgia Tech’s Keeneland Workshop.

Spafford’s ran ORNL’s Scalable Heterogeneous Computing Benchmark Suite (SHOC) that has been optimized for both CUDA and OpenCL, and found that OpenCL can match CUDA performance on most of the basic math kernels. He also found that OpenCL’s performance on some kernels, like SGEMM, has increased 10-fold since 2009. The one code that CUDA still has a significant performance advantage is that of the Fast Fourier Transform (FFT). Spafford attributes CUDA’s better FFT performance on its use of a fast intrinsic, with OpenCL implementation (NVIDIA’s in this case*) employing a slower, more accurate version. If the implementations are matched, the performance difference goes away, says Spafford.

Others have found similar behavior on stand-alone science applications. A research group at Dartmouth running a numerical model of gravitation waves with OpenCL and CUDA found similar performance between OpenCL and CUDA, in this case on Tesla GPUs and IBM’s Cell BE processors. In the resulting paper, the researchers conclude that “an OpenCL-based implementation delivers comparable performance to that based on a native SDK on both types of accelerator hardware.”

GPU software maker AccelerEyes has seen CUDA and OpenCL performance equalize. The company, which recently released OpenCL-powered beta versions of their two flagship software products, ArrayFire and Jacket, has found that for most kernel codes, the two technologies now exhibit similar performance. Like ORNL, they found FFT speed is still better on CUDA due to NVIDIA’s faster implementation, but AMD’s OpenCL compiler and libraries have improved considerably, both in scope and performance.

According to AccelerEyes CEO John Melonakos, over half of their customers develop their GPU-accelerated code on their PCs before deploying to a workstation or cluster, so the ability to support non-NVIDIA hardware can be quite useful. For example, customers using MacBooks as development platforms couldn’t run CUDA there because Apple has no NVIDIA GPU option on its latest laptops. And since the AMD OpenCL libraries that AccelerEyes used in their beta offerings work just fine on Intel CPUs, AMD CPUs, and NVIDIA GPUs, there are no hardware incompatibility issues.

Then there are users who are just unwilling to adopt vendor-specific software stacks such as CUDA. “There are a class of people who absolutely want to do GPU computing but are resistant to anything that is vendor-locked,” Melonakos told HPCwire. He says this is group that has jumped onto their OpenCL-based offerings first.

To counter that kind of perception, NVIDIA has recently opened up the CUDA compiler source code for third-party developers. Significantly though, NVIDIA is not putting its all-important CUDA math libraries, like CUBLAS and CUFFT, into the open source pot. According to Melonakos, the large and mature library set is CUDA’s real strength in the technical computing arena. Open source or not, NVIDIA still retains control of the CUDA software technology, which is why it is still perceived as a vendor-specific solution.

Even NVIDIA and Intel are hedging their bets with OpenCL though, with both vendors offering software hooks for their respective hardware. At this point, these companies are providing this support as a nod to their mobile computing developers (although Intel is reportedly working on a MIC processor port too). But since there is an increasing amount of cross-pollination between mobile and HPC these days, it’s not clear how developers will end up using these technologies.

In fact, if the mobile space latches onto OpenCL in a big way and it becomes the standard low-level solution for heterogenous computing, that could help speed its adoption at the high-end. Once OpenCL reaches a critical mass of acceptance in a volume market such as that, there will be a rapid increase in demand for robust compilers and libraries. As Melonakos put it: “I dont think OpenCL is going away.”

[Editor’s note: The original article erroneously stated that the SHOC benchmark work used AMD’s implementation of OpenCL, rather than NVIDIA’s. We regret the error.]

Subscribe to HPCwire's Weekly Update!

Be the most informed person in the room! Stay ahead of the tech trends with industry updates delivered to you every week!

The Annual SCinet Mandala

November 30, 2023

Perhaps you have seen images of Tibetan Buddhists creating beautiful and intricate images with colored sand. These sand mandalas can take weeks to create, only to be ritualistically dismantled when the image is finished. Read more…

Alibaba Shuts Down its Quantum Computing Effort

November 30, 2023

In case you missed it, China’s e-commerce giant Alibaba has shut down its quantum computing research effort. It’s not entirely clear what drove the change. Reuters’ reported earlier this week that Alibaba “cut a Read more…

SC23: The Ethics of Supercomputing

November 29, 2023

Why should HPC practitioners care about ethics? And, what are our ethics in HPC? These questions were central to a lively discussion at the SC23 Birds-of-a-Feather (BoF) session: With Great Power Comes Great Responsib Read more…

Grace Hopper’s Big Debut in AWS Cloud While Graviton4 Launches

November 29, 2023

Editors Note: Additional Coverage of the AWS-Nvidia 65 Exaflop ‘Ultra-Cluster’ and Gravitron4 can be found on our sister site Datanami. Amazon Web Services will soon be home to a new Nvidia-built supercomputer tha Read more…

Give a Little (on Tuesday), Get a Lot

November 28, 2023

HPC is built on open source. While building HPC systems with "open plumbing" has enormous advantages, there can also be some challenges. As illustrated in the classic XKCD comic, the entire dependency tree of many usefu Read more…

AWS Solution Channel

Deploying AI/ML at the Edge with Omniflow’s Sustainable Smart Lamppost, NVIDIA, and AWS

Imagine a world where a lamppost does more than just illuminate streets; it actively contributes to a smarter, safer, and more sustainable community. Using Amazon Web Services (AWS) and NVIDIA technologies, Omniflow is turning this vision into a reality. Read more…

QCT Solution Channel

QCT and Intel Codeveloped QCT DevCloud Program to Jumpstart HPC and AI Development

Organizations and developers face a variety of issues in developing and testing HPC and AI applications. Challenges they face can range from simply having access to a wide variety of hardware, frameworks, and toolkits to time spent on installation, development, testing, and troubleshooting which can lead to increases in cost. Read more…

re:Invent 2023: AWS Talks a Little Quantum, Showcases Error Correction Progress

November 28, 2023

Quantum computing held sway in the last few minutes of AWS senior vice president Peter DeSantis’ keynote yesterday at the AWS re:Invent 2023 conference, being held in Las Vegas this week. While scarce on details, DeSan Read more…

The Annual SCinet Mandala

November 30, 2023

Perhaps you have seen images of Tibetan Buddhists creating beautiful and intricate images with colored sand. These sand mandalas can take weeks to create, only Read more…

SC23: The Ethics of Supercomputing

November 29, 2023

Why should HPC practitioners care about ethics? And, what are our ethics in HPC? These questions were central to a lively discussion at the SC23 Birds-of-a-Fe Read more…

Grace Hopper’s Big Debut in AWS Cloud While Graviton4 Launches

November 29, 2023

Editors Note: Additional Coverage of the AWS-Nvidia 65 Exaflop ‘Ultra-Cluster’ and Gravitron4 can be found on our sister site Datanami. Amazon Web Servic Read more…

Analyst Panel Says Take the Quantum Computing Plunge Now…

November 27, 2023

Should you start exploring quantum computing? Yes, said a panel of analysts convened at Tabor Communications HPC and AI on Wall Street conference earlier this y Read more…

SCREAM wins Gordon Bell Climate Prize at SC23

November 21, 2023

The first Gordon Bell Prize for Climate Modeling was presented at SC23 in Denver. The award went to a team led by Sandia National Laboratories that had develope Read more…

SC23 BOF: Inclusivity Progress and Challenges

November 21, 2023

New to SC23 was a series of talks on Inclusivity topics. Sponsored by the Inclusivity Committee and open to all conference attendees, these 90-minute birds-of-a Read more…

Supercomputing 2023: Odds and Ends from the Show

November 20, 2023

This year's fantastic Supercomputing 2023 was back in full form. Attendees seemed to be glad that the show was back in Denver, which was a preferred destination Read more…

Material Simulation with Quantum Accuracy Wins 2023 ACM Gordon Bell Prize

November 20, 2023

Accurately calculating interactions among electrons has been a significant obstacle to reliable material exploration and design through computer modeling. Recen Read more…

CORNELL I-WAY DEMONSTRATION PITS PARASITE AGAINST VICTIM

October 6, 1995

Ithaca, NY --Visitors to this year's Supercomputing '95 (SC'95) conference will witness a life-and-death struggle between parasite and victim, using virtual Read more…

SGI POWERS VIRTUAL OPERATING ROOM USED IN SURGEON TRAINING

October 6, 1995

Surgery simulations to date have largely been created through the development of dedicated applications requiring considerable programming and computer graphi Read more…

U.S. Will Relax Export Restrictions on Supercomputers

October 6, 1995

New York, NY -- U.S. President Bill Clinton has announced that he will definitely relax restrictions on exports of high-performance computers, giving a boost Read more…

Dutch HPC Center Will Have 20 GFlop, 76-Node SP2 Online by 1996

October 6, 1995

Amsterdam, the Netherlands -- SARA, (Stichting Academisch Rekencentrum Amsterdam), Academic Computing Services of Amsterdam recently announced that it has pur Read more…

Cray Delivers J916 Compact Supercomputer to Solvay Chemical

October 6, 1995

Eagan, Minn. -- Cray Research Inc. has delivered a Cray J916 low-cost compact supercomputer and Cray's UniChem client/server computational chemistry software Read more…

NEC Laboratory Reviews First Year of Cooperative Projects

October 6, 1995

Sankt Augustin, Germany -- NEC C&C (Computers and Communication) Research Laboratory at the GMD Technopark has wrapped up its first year of operation. Read more…

Sun and Sybase Say SQL Server 11 Benchmarks at 4544.60 tpmC

October 6, 1995

Mountain View, Calif. -- Sun Microsystems, Inc. and Sybase, Inc. recently announced the first benchmark results for SQL Server 11. The result represents a n Read more…

New Study Says Parallel Processing Market Will Reach $14B in 1999

October 6, 1995

Mountain View, Calif. -- A study by the Palo Alto Management Group (PAMG) indicates the market for parallel processing systems will increase at more than 4 Read more…

Leading Solution Providers

Contributors

SC23 Booth Videos

AMD @ SC23
AWS @ SC23
Altair @ SC23
CoolIT @ SC23
Cornelis Networks @ SC23
CoreHive @ SC23
DDC @ SC23
HPE @ SC23 with Justin Hotard
HPE @ SC23 with Trish Damkroger
Intel @ SC23
Intelligent Light @ SC23
Lenovo @ SC23
Penguin Solutions @ SC23
QCT Intel @ SC23
Tyan AMD @ SC23
Tyan Intel @ SC23
HPCwire LIVE from SC23 Playlist

CORNELL I-WAY DEMONSTRATION PITS PARASITE AGAINST VICTIM

October 6, 1995

Ithaca, NY --Visitors to this year's Supercomputing '95 (SC'95) conference will witness a life-and-death struggle between parasite and victim, using virtual Read more…

SGI POWERS VIRTUAL OPERATING ROOM USED IN SURGEON TRAINING

October 6, 1995

Surgery simulations to date have largely been created through the development of dedicated applications requiring considerable programming and computer graphi Read more…

U.S. Will Relax Export Restrictions on Supercomputers

October 6, 1995

New York, NY -- U.S. President Bill Clinton has announced that he will definitely relax restrictions on exports of high-performance computers, giving a boost Read more…

Dutch HPC Center Will Have 20 GFlop, 76-Node SP2 Online by 1996

October 6, 1995

Amsterdam, the Netherlands -- SARA, (Stichting Academisch Rekencentrum Amsterdam), Academic Computing Services of Amsterdam recently announced that it has pur Read more…

Cray Delivers J916 Compact Supercomputer to Solvay Chemical

October 6, 1995

Eagan, Minn. -- Cray Research Inc. has delivered a Cray J916 low-cost compact supercomputer and Cray's UniChem client/server computational chemistry software Read more…

NEC Laboratory Reviews First Year of Cooperative Projects

October 6, 1995

Sankt Augustin, Germany -- NEC C&C (Computers and Communication) Research Laboratory at the GMD Technopark has wrapped up its first year of operation. Read more…

Sun and Sybase Say SQL Server 11 Benchmarks at 4544.60 tpmC

October 6, 1995

Mountain View, Calif. -- Sun Microsystems, Inc. and Sybase, Inc. recently announced the first benchmark results for SQL Server 11. The result represents a n Read more…

New Study Says Parallel Processing Market Will Reach $14B in 1999

October 6, 1995

Mountain View, Calif. -- A study by the Palo Alto Management Group (PAMG) indicates the market for parallel processing systems will increase at more than 4 Read more…

  • arrow
  • Click Here for More Headlines
  • arrow
HPCwire