-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] Building onnxruntime_test_all #19640
Comments
@snnn any reason not to use FindPackage for the CUDA libraries? We might need to set CUDAToolkit_ROOT to the cuda_home value when calling cmake though. https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html |
Example build script for Windows:
|
CMake has 3 offerings for this:
We are using the first one. And it is enough for all our needs. Therefore we are not using the third one. The issue @gedoensmax because as I put the in comments: onnxruntime_test_all.exe should not have direct dependency on CUDA DLL, but it does so. In my opinion we should revert #16161 and find another way to test the internal CUDA code. |
While I agree with that it is suboptimal to link cedar to the test, I would still resolve the CUDA libs with the onnxruntime/cmake/external/onnxruntime_external_deps.cmake Lines 557 to 570 in 91b2e66
|
### Description Answers issue #19640 More details are in the issue, basically I am changing all the include directory and link directory usage to CMake's `CUDA::*` targets
Answers issue #19640 More details are in the issue, basically I am changing all the include directory and link directory usage to CMake's `CUDA::*` targets
Describe the issue
I am not able to build onnxruntime with all unittests and CUDA due to linking against cudart here:
onnxruntime/cmake/onnxruntime_unittests.cmake
Lines 67 to 71 in 91b2e66
The solution to this is to add the line
target_link_directories(${_UT_TARGET} PRIVATE ${onnxruntime_CUDA_HOME}/lib/x64)
I would like to understand why cudart linkin is managed without using CMake built in
find_package(CUDAToolkit)
and then linking toCUDA::cudart
? I am happy to integrate this change if it is something that would be welcome.Urgency
No response
Target platform
Windows 11
Build script
Error / output
Visual Studio Version
2022
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: