Less is more with OpenCL 3.0: Implementing the 2.x spec was tricky – so now everything beyond 1.2 is optional

Cross-platform software acceleration API should be easier to jump on


The Khronos Group has pushed out the Open CL 3.0 provisional specification, a major update to the cross-platform API used for accelerating software performance by using the concurrent programming capabilities of GPUs and CPUs.

OpenCL is part of a family of projects that also includes SPIR-V, an intermediate representation that targets both Vulkan (cross-platform GPU graphics API) and OpenCL drivers, and SYCL (C++ template libraries to simplify OpenCL coding).

The ability to do general-purpose computing on GPUs, which are optimised for parallel processing, as well as easily taking advantage of multi-threading on a CPU, can make a massive difference in performance, not only at the high end in supercomputers, but also on PCs and mobiles. That said, even OpenCL 1.2, released in 2011, appears to be good enough for many developers.

"OpenCL 1.2 has proven itself as the baseline needed by all vendors and markets," said Neil Trevett, president of the Khronos Group. Therefore, OpenCL 3.0 [PDF] "makes all functionality beyond version 1.2 optional". While this may seem like a backward step, the idea is that a broad range of devices can have OpenCL 3.0-compliant drivers, and that developers will query for additional features, such as those introduced in OpenCL 2.x, using them only if they are available. This also means it is easy for implementers to "upgrade" drivers, simply by adding any missing OpenCL 2.x queries.

The change is a reaction to issues with the "monolithic" OpenCL 2.x specifications, which were a deterrent to adoption since it was challenging to implement everything. Khronos even suggests in its presentation that implementers "may choose to drop OpenCL 2.x features if not relevant to target markets, to reduce costs and increase quality."

The risk is that OpenCL 1.2 is now set in stone as a base API and developers may be reluctant to move beyond it.

OpenCL C, a specification for C programming language extensions to support parallel programming, has been updated to OpenCL C 3.0. The OpenCL C++ language, however, has been abandoned in favour of C++ for OpenCL, a Clang project which is also compatible with OpenCL C and outputs SPIR-V.

New features in OpenCL 3.0 include asynchronous DMA (Direct Memory Access) extensions, aimed at improving support for embedded processors which implement DMA.

The OpenCL roadmap presented today

The OpenCL roadmap presented today

Usage of OpenCL is increasing, says Khronos. According to its presentation, Adobe's Premiere Rush video editing application has 200,000 lines of OpenCL code, and the popular [email protected] project uses OpenCL. An analysis of open-source GitHub repositories shows around 9,500 OpenCL projects, double the number compared to three years ago (though that statistic does not look so good if you consider that the total number of GitHub repositories has also more than doubled over that period). The group additionally highlighted the work with Microsoft and Collabora to enable OpenCL on DirectX 12, and invited support for a potential new project to enable OpenCL on Apple's Metal API for graphics programming on iOS and macOs.

With OpenCL 3.0, less is more: the key feature is to make the specification modular so that future enhancements can be introduced gradually and implemented by a subset of drivers according to what is appropriate for the targeted devices. This means that adoption of OpenCL 3.0 should in theory be quick, because of the ease of migrating OpenCL 1.2 drivers, even if actual functionality is little changed. ®


Other stories you might like

  • Experts: AI should be recognized as inventors in patent law
    Plus: Police release deepfake of murdered teen in cold case, and more

    In-brief Governments around the world should pass intellectual property laws that grant rights to AI systems, two academics at the University of New South Wales in Australia argued.

    Alexandra George, and Toby Walsh, professors of law and AI, respectively, believe failing to recognize machines as inventors could have long-lasting impacts on economies and societies. 

    "If courts and governments decide that AI-made inventions cannot be patented, the implications could be huge," they wrote in a comment article published in Nature. "Funders and businesses would be less incentivized to pursue useful research using AI inventors when a return on their investment could be limited. Society could miss out on the development of worthwhile and life-saving inventions."

    Continue reading
  • Declassified and released: More secret files on US govt's emergency doomsday powers
    Nuke incoming? Quick break out the plans for rationing, censorship, property seizures, and more

    More papers describing the orders and messages the US President can issue in the event of apocalyptic crises, such as a devastating nuclear attack, have been declassified and released for all to see.

    These government files are part of a larger collection of records that discuss the nature, reach, and use of secret Presidential Emergency Action Documents: these are executive orders, announcements, and statements to Congress that are all ready to sign and send out as soon as a doomsday scenario occurs. PEADs are supposed to give America's commander-in-chief immediate extraordinary powers to overcome extraordinary events.

    PEADs have never been declassified or revealed before. They remain hush-hush, and their exact details are not publicly known.

    Continue reading
  • Stolen university credentials up for sale by Russian crooks, FBI warns
    Forget dark-web souks, thousands of these are already being traded on public bazaars

    Russian crooks are selling network credentials and virtual private network access for a "multitude" of US universities and colleges on criminal marketplaces, according to the FBI.

    According to a warning issued on Thursday, these stolen credentials sell for thousands of dollars on both dark web and public internet forums, and could lead to subsequent cyberattacks against individual employees or the schools themselves.

    "The exposure of usernames and passwords can lead to brute force credential stuffing computer network attacks, whereby attackers attempt logins across various internet sites or exploit them for subsequent cyber attacks as criminal actors take advantage of users recycling the same credentials across multiple accounts, internet sites, and services," the Feds' alert [PDF] said.

    Continue reading

Biting the hand that feeds IT © 1998–2022