gemini-2.5-flash-preview-09-2025| input-price: 0.3 output-price: 2.5 max-context-length: 128_000 (cost: $0.007) Β· Anfrage: 2025-09-27T22:54:41.149263
Generated by rs-summarizer Version unbekannt
Abstract:
NVIDIA is introducing two significant, behavior-changing updates to the NVIDIA CUDA Compiler Driver (NVCC) in the upcoming CUDA 13.0 release, intended to mitigate subtle, hard-to-debug runtime errors related to ELF visibility and linkage of device entities. The first change, primarily affecting shared libraries on non-Windows platforms, forces hidden ELF visibility for __global__ functions and device variables (__managed__, __device__, __constant__) to prevent conflicts arising from linking multiple versions of the CUDA Runtime Library (CUDART). The second change forces internal linkage for host template stub definitions of __global__ functions in the default whole program compilation mode (-rdc=false), resolving ambiguities when template definitions are merged by the host linker. While these changes enhance robustness, developers using existing workflows must be prepared to update their code or utilize new NVCC flags (-device-entity-has-hidden-visibility and -static-global-template-stub) to explicitly opt out of the new default behaviors.
Introduction to Changes (CUDA 13.0)
__global__ functions and device variables (__managed__/__device__/__constant__).__global__ function host template stub definitions (when using whole program compilation mode, -rdc=false).NVCC Change #1: ELF Visibility
.so), they maintained external visibility. If the main program also statically links CUDART (the default), this results in two distinct CUDART libraries being linked, causing runtime failures (e.g., kernel launches fail silently, or __managed__ variable access causes segmentation faults).-device-entity-has-hidden-visibility=false or by explicitly annotating symbols with __attribute__((visibility("default"))).NVCC Change #2: Forced Internal Linkage
__global__ template functions compiled in the default whole program mode (-rdc=false). NVCC generates host stub functions for these kernels.__global__ templates traditionally had external (weak) linkage. If two different translation units (a.cu and b.cu) include and launch the same template, the host linker may merge the stubs, causing a launch in a.cu to incorrectly execute the kernel in the device program generated from b.cu.-static-global-template-stub=false.Key Takeaway: