Commits


Yifan Li authored and GitHub committed c95d828367f
Enable Relocatable Device Code (RDC) to build ORT with cuda 12.8 (#23562) ### Description <!-- Describe your changes. --> When building ORT on windows with cuda 12.8, there were compile errors and log was prompting `To resolve this issue, either use "-rdc=true", or explicitly set "-static-global-template-stub=false" (but see nvcc documentation about downsides of turning it off)` This PR * enables `-rdc=true` ([Relocatable Device Code (RDC)](https://forums.developer.nvidia.com/t/the-cost-of-relocatable-device-code-rdc-true/47665)) * enable [CUDA_SEPARABLE_COMPILATION](https://cmake.org/cmake/help/latest/prop_tgt/CUDA_SEPARABLE_COMPILATION.html) to support separate compilation of device code * skips the 4505 compiler check, as enabling rdc would init check towards internal linkage and make 4505 warning that treated as error ``` C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\crt/host_runtime.h(274): error C2220: the following warning is treated as an error [C:\Users\yifanl\Downloads\0202-new-cmake-config\Release\onnxruntime_providers_cuda.vcxproj] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\crt/host_runtime.h(274): warning C4505: '__cudaUnregisterBinaryUtil': unreferenced function with internal linkage has been removed ``` ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->