GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Remove unused CUDA UUID functions from GCC's cuda.h

CUDA UUID functions are moved from GCC's cuda.h to libgomp plugin for better version compatibility.

Functions cuDeviceGetUuid and cuDeviceGetUuid_v2, which were previously added to GCC’s cuda.h, have been removed. These functions are not part of the CUDA 8.0 specification that GCC’s header targets. They are now provided in libgomp/plugin/plugin-nvptx.c to ensure compatibility when using older CUDA versions with specific compiler configurations.

In Details

This commit removes cuDeviceGetUuid and cuDeviceGetUuid_v2 from include/cuda/cuda.h because they were introduced after CUDA 8.0 (the version targeted by the header, defined by CUDA_VERSION 8000). These functions are now declared in libgomp/plugin/plugin-nvptx.c and conditionally provided based on CUDA_VERSION, ensuring compatibility for -DPLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H configurations with older CUDA toolkits.

For Context
cuda.h
The primary header file for the CUDA (Compute Unified Device Architecture) toolkit, providing declarations for CUDA runtime API functions and types.
libgomp
The GNU OpenMP runtime library, providing support for parallel programming using OpenMP directives. It includes plugins for various hardware backends.
plugin-nvptx.c
A source file within libgomp that implements support for the NVIDIA GPU (NVPTX) backend, likely handling GPU-specific functionalities and interactions.
CUDA_VERSION
A macro defined in CUDA headers that specifies the version of the CUDA toolkit. GCC uses this to conditionally include or exclude certain APIs.
Filed Under: cudalibgompcompatibility