BayLibre is Powering Supercomputers with GCC Enhancements

For the past couple of years, BayLibre’s Compiler team has been at the forefront of GCC enhancement, mandated by Oak Ridge National Laboratory to deliver advancements for GPU accelerator offloading. This work is vital for the world’s most powerful supercomputers, ensuring they achieve necessary computational capabilities within an affordable power envelope.

A Legacy of Open-Source Contribution

Composed of GNU toolchain maintainers and contributors, many of whom joined BayLibre in 2024 from CodeSourcery/Mentor/Siemens, the BayLibre Compiler Services Team has a proven track record. Their upstream contributions date back to the early 2000s, with current team members having committed over 3,000 patches to the GCC mainline repository since 2010, and more than 1,500 since 2019.

Beyond features development, the team regularly contributes bug fixes, cleanups, documentation, and code reviews for GCC code supporting accelerator programming languages (OpenMP and OpenACC), NVPTX and AMD GCN back ends, and more. In addition, the team actively participates in the OpenMP and OpenACC specification process.

Key Achievements in Accelerator Support

In 2020, the team began integrating missing OpenMP 4.5 features into GCC, supporting both AMD and Nvidia GPUs. Mandated by ORNL, significant milestones have been achieved in the following, including:

  • Adding OpenMP 5.0 / 5.1 / 5.2 support for AMD and Nvidia
  • Adding OpenACC 2.7 support for AMD and Nvidia
  • Adding GPU C++ Freestanding Standard Library for AMD and Nvidia
  • Adding OpenMP Interoperability Support for Nvidia’s CUDA, and AMD’s HIP and HSA
  • Taking the first steps in performance optimization

The Road Ahead: Performance and Portability

The team is now preparing for the next phase of this work. This involves porting compiler support to the latest versions of base languages (C, C++, Fortran) and upgrading to the newest OpenMP and OpenACC specifications. Another key focus will be defining a general methodology for performance improvement, including optimizing both GPU kernel launch times and code generation to make best use of GPU capabilities.

All the work completed and ongoing by the BayLibre Compiler Services Team, being open-source solutions, offers benefits to supercomputer users worldwide. By facilitating the portability of user code between systems with and without accelerators, they are participating in shaping the future of high-performance computing.

BayLibre’s development work to improve this well-known tool (GCC) has the potential to benefit the whole HPC community,” said David Bernholdt, distinguished R&D staff member at Oak Ridge National Laboratory.

We are excited about the continued impact of these contributions on the supercomputing landscape!

BayLibre contributions to GCC 15

The GNU Compiler Collection project made its major annual release on April 25, 2025, with the publication of GCC 15.1.  BayLibre’s Compiler & Toolchain Services team — the “Sourcerers” — were major contributors to this release, with 395 commits by team members.  Three Sourcerers (Thomas Schwinge, Tobias Burnus, and Sandra Loosemore) were in the top 25 contributors by number of commits for this release cycle (GCC 15 release notes).

OpenMP and Offloading

BayLibre’s contributions to GCC 15 are primarily focused on OpenMP and GPU offloading.  OpenMP permits thread-parallel execution and offloading of program parts to GPUs via directive-based language extensions and the run-time library.  It is widely used in scientific programs, ranging from laptops to large supercomputers.

Specific improvements in this area that were contributed by BayLibre engineers for the GCC 15 release include:

  • Support for the “unified_shared_memory” and “self_maps” requirements, when supported by the hardware.
  • Additional features on Nvidia GPUs, including support for GCC’s “constructor” and “destructor” attributes, stack unwinding, and basic Fortran output.
  • Update the list of supported AMD GPUs, including removing support for the obsolete gfx803 “Fiji” target and adding initial support for generic offload targets.
  • Improve vectorizer tuning for AMD offload targets.
  • Add a predefined allocator for pinned memory.
  • Support for constructors and destructors for “declare target” static aggregates.
  • Support for mapping of Fortran objects with allocatable components.
  • Implement the “metadirective” directive, and support for dynamic context selectors in both “metadirective” and “declare variant”.
  • Implement the OpenMP “dispatch” directive and the “adjust_args” clause for “declare variant”, including the “need_device_addr” and “need_device_ptr” modifiers.
  • Implement the “interop” construct and the “interop” modifier to the “declare variant” “append_args” clause.
  • Support for using the standard C++ library in offloaded code on both AMD and Nvidia targets.
  • Numerous bug fixes, internal code improvements, improved error   checking and diagnostic messages, additional test cases.

Documentation

A secondary focus for the Sourcerers in this release cycle was improving GCC’s user-facing documentation.  In addition to updates to the GNU Offloading and Multi Processing Runtime Library manual, many long-standing bugs in the main GCC user manual were fixed, obsolete material was removed, and there was a major reorganization of the section on GCC extensions to the C language family.  A number of fixes and improvements were also made to the GNU Fortran manual.

More about GCC 15

The GCC 15 release notes cover changes in this version of GCC beyond BayLibre’s contributions listed above.  Some items of particular note are that support for the ISO C23 standard is complete and this is now GCC’s default dialect; and the addition of an ISO-compliant COBOL front end.

About BayLibre’s Compiler & Toolchain Services Team

BayLibre’s Compiler Services team includes several former CodeSourcery engineers who joined Baylibre in early 2024, bringing more than 100 person-years of experience with compilers and related technologies such as linkers and debuggers.  Team members have produced complete open-source toolchains targeting everything from bare-metal embedded processors for consumer and automotive applications to the world’s most powerful supercomputers.  Previously at BayLibre, the team also contributed to GCC 14.