Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Arm Community blogs
Arm Community blogs
Tools, Software and IDEs blog IWOCL - Enhanced Support for OpenCL Open Source Tools and Resources
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded and Microcontrollers blog

  • Internet of Things (IoT) blog

  • Laptops and Desktops blog

  • Mobile, Graphics, and Gaming blog

  • Operating Systems blog

  • Servers and Cloud Computing blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tags
  • OpenCL
  • Open Source Projects
  • C++
  • gpu
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

IWOCL - Enhanced Support for OpenCL Open Source Tools and Resources

Anastasia Stulova
Anastasia Stulova
June 11, 2019
3 minute read time.

The LLVM project is an open source compiler framework that supports code-generation for many hardware platforms. Major platform vendors produce toolchains based on the LLVM Project due to its permissive free software license model as well as the modular design which allows reuse of code optimisation and code generation components across different hardware platforms. Arm is supporting the open source LLVM community in areas that target the Arm architecture. You can read the blog on accelerating open source LLVM development for more information on the project.

Arm is actively working with The Khronos Group to help refine and define open standards and also help to improve the open source tooling ecosystem. One of the key building blocks of this ecosystem push has been the formation of the Khronos OpenCL Tooling Subgroup that has been focused on developing and enhancing open source tools and components. These tools, targeted at embedded systems and heterogeneous computation applications, will be accessible to everyone in the OpenCL ecosystem.

At the 7th annual International Workshop on OpenCL (IWOCL) gathering of OpenCL, SYCL, and SPIR developers, researchers, and suppliers, one of the announced enhancements was C++ for OpenCL support in Clang. Arm has been a leading contributor to this and is actively developing it in upstream Clang. IWOCL is rapidly growing year on year, and the engagement of the OpenCL working group is another addition that will aid the community by solving their problems and headaches, all via open source tooling.

What is Clang?

The Clang project provides a compiler frontend and tooling infrastructure for languages in the C family (C, C++, Objective C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.

Using the latest standards

The OpenCL Tooling Sub Group has been actively working on frontend support for all OpenCL C language versions (including backwards compatibility) in Clang. Recently, experimental support for C++ in OpenCL has started to be implemented in Clang 9.0 supporting features from both OpenCL C 2.0 and C++17. This new OpenCL language mode can be activated by passing -std=c++ to Clang. Standard OpenCL C code can be parsed with this new mode, as well as the additional C++ features. This work enables existing OpenCL C applications to incrementally transition to using C++ capabilities. The C++ for OpenCL in Clang frontend is compatible with any OpenCL 2.0 drivers with SPIR-V ingestion. Developers can access early evaluation of this new OpenCL functionality and provide feedback through the Compiler Explorer.

Clang diagram

Clang code snippet

To get more of an idea how all of this fits together, , along with SPIR targets and translation. The main takeaway is that you can load on existing drivers, so you don’t have to wait for this support to arrive in the future.

Developers can target generating SPIR-V 1.0/1.2 using SPIRV-LLVM Translator or end binary for upstream targets available in LLVM. These two formats can be directly loaded into existing drivers with OpenCL 2.0 capabilities. In the future, drivers are expected to be extended to include the functionality to take full advantage of new language (avoid requiring workaround for global constructors in the application side).

What’s Next?

Like with any project our work doesn’t suddenly stop at a certain release. In September, experimental C++ support will appear in Clang 9.0. However, initial support will only combine features existing in both languages and new features are likely to be built on top this initial work in the next releases. There are also plans to update drivers to provide online compilation from C++ in the near future. I hope to explain further updates in greater detail here on the Arm Community.

Get involved

We invite you to use these resources in your projects but to also provide us with the most useful asset a developer can give, feedback! You can submit bug reports on Bugzilla or get in touch with us directly right here on the Arm Community

Learn about Clang

Anonymous
Tools, Software and IDEs blog
  • GCC 15: Continuously Improving

    Tamar Christina
    Tamar Christina
    GCC 15 brings major Arm optimizations: enhanced vectorization, FP8 support, Neoverse tuning, and 3–5% performance gains on SPEC CPU 2017.
    • June 26, 2025
  • GitHub and Arm are transforming development on Windows for developers

    Pareena Verma
    Pareena Verma
    Develop, test, and deploy natively on Windows on Arm with GitHub-hosted Arm runners—faster CI/CD, AI tooling, and full dev stack, no emulation needed.
    • May 20, 2025
  • What is new in LLVM 20?

    Volodymyr Turanskyy
    Volodymyr Turanskyy
    Discover what's new in LLVM 20, including Armv9.6-A support, SVE2.1 features, and key performance and code generation improvements.
    • April 29, 2025