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

  • Will Lenovo ever think beyond hardware?
    Then again, why develop your own software à la HPE GreenLake when you can use someone else's?

    Analysis Lenovo fancies its TruScale anything-as-a-service (XaaS) platform as a more flexible competitor to HPE GreenLake or Dell Apex. Unlike its rivals, Lenovo doesn't believe it needs to mimic all aspects of the cloud to be successful.

    While subscription services are nothing new for Lenovo, the company only recently consolidated its offerings into a unified XaaS service called TruScale.

    On the surface TruScale ticks most of the XaaS boxes — cloud-like consumption model, subscription pricing — and it works just like you'd expect. Sign up for a certain amount of compute capacity and a short time later a rack full of pre-plumbed compute, storage, and network boxes are delivered to your place of choosing, whether that's a private datacenter, colo, or edge location.

    Continue reading
  • Intel is running rings around AMD and Arm at the edge
    What will it take to loosen the x86 giant's edge stranglehold?

    Analysis Supermicro launched a wave of edge appliances using Intel's newly refreshed Xeon-D processors last week. The launch itself was nothing to write home about, but a thought occurred: with all the hype surrounding the outer reaches of computing that we call the edge, you'd think there would be more competition from chipmakers in this arena.

    So where are all the AMD and Arm-based edge appliances?

    A glance through the catalogs of the major OEMs – Dell, HPE, Lenovo, Inspur, Supermicro – returned plenty of results for AMD servers, but few, if any, validated for edge deployments. In fact, Supermicro was the only one of the five vendors that even offered an AMD-based edge appliance – which used an ageing Epyc processor. Hardly a great showing from AMD. Meanwhile, just one appliance from Inspur used an Arm-based chip from Nvidia.

    Continue reading
  • NASA's Psyche mission: 2022 launch is off after software arrives late
    Launch window slides into 2023 or 2024 for asteroid-probing project

    Sadly for NASA's mission to take samples from the asteroid Psyche, software problems mean the spacecraft is going to miss its 2022 launch window.

    The US space agency made the announcement on Friday: "Due to the late delivery of the spacecraft's flight software and testing equipment, NASA does not have sufficient time to complete the testing needed ahead of its remaining launch period this year, which ends on October 11."

    While it appears the software and testbeds are now working, there just isn't enough time to get everything done before a SpaceX Falcon Heavy sends the spacecraft to study a metallic-rich asteroid of the same name.

    Continue reading
  • Rise in Taiwanese energy prices may hit global chip production
    National provider considering cost increase of 8%, which could be passed on to tech customers

    Taiwan's state-owned energy company is looking to raise prices for industrial users, a move likely to impact chipmakers such as TSMC, which may well have a knock-on effect on the semiconductor supply chain.

    According to Bloomberg, the Taiwan Power Company, which produces electricity for the island nation, has proposed increasing electricity costs by at least 8 percent for industrial users, the first increase in four years.

    The power company has itself been hit by the rising costs of fuel, including the imported coal and natural gas it uses to generate electricity. At the same time, the country is experiencing record demand for power because of increasing industrial requirements and because of high temperatures driving the use of air conditioning, as reported by the local Taipei Times.

    Continue reading
  • Tech companies ready public stances on Roe v. Wade
    Some providing out-of-state medical expenses, others spout general pro-choice statements

    Several US tech companies have taken a stance or issued statements promising healthcare-related support for employees following the Supreme Court's ruling to overturn Roe v Wade last Friday.

    A Supreme Court draft opinion that was leaked in February provided advanced warning of the legal eventuality, giving companies plenty of time to prepare official positions and related policies for employees.

    Without proper policies in place, tech companies could put themselves at risk of "brain drain" as employees become tempted to relocate to states where abortion access is readily available or to companies that better support potential needs as healthcare in the US is more often tied to an employer than not.

    Continue reading

Biting the hand that feeds IT © 1998–2022