-
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] linking against header-only library cudnn_frontend #22855
Comments
cudnn_frontend is an interface library. Need use target_link_libraries() in CMake. Interface libraries in CMake are special in that they do not generate any compiled output themselves but propagate build properties, such as include directories or other linked libraries, to targets that depend on them. Example to use it: onnxruntime/cmake/onnxruntime_providers_cuda.cmake Lines 200 to 210 in bbe7c87
Here is related doc about build: https://onnxruntime.ai/docs/build/eps.html#cuda |
cudnn_frontend is a cmake target. It's ok to do so, because the
Let me know if it would solve the problem. |
This is largely the result of the way I was bringing in With Nixpkgs, I was including the result of The dependency fetching setup you've got in-repo will fetch the In terms of my packaging, I've vendored a replacement for I then patch find_package(cudnn_frontend REQUIRED) and all works again. I would like it if NVIDIA projects which are built and installed by CMake provide CMake configurations, but not all of them do. As such, I'm closing this issue since it's not a problem caused by |
Describe the issue
I'm packaging
onnxruntime
for the Nixpkgs CUDA ecosystem (https://github.com/connorbaker/cuda-packages).When building with
nix
, I ran into errors while linking because the linker was unable to find-lcudnn_frontend
.My understanding was that
cudnn-frontend
was a header-only library (https://github.com/NVIDIA/cudnn-frontend) -- why doesonnxruntime
try to link against a library?onnxruntime/cmake/onnxruntime_unittests.cmake
Line 70 in ac9c135
onnxruntime/cmake/onnxruntime_providers_cuda.cmake
Line 208 in ac9c135
Urgency
No response
Target platform
x86_64-linux with TensorRT
Build script
nix build -L --builders '' --no-link github:connorbaker/cuda-packages/fabe15378f8cf5a0870d6189115170a042a802f5#pkgsCuda.sm_89.cudaPackages_12.onnxruntime
Error / output
Visual Studio Version
No response
GCC / Compiler Version
13.3.0
The text was updated successfully, but these errors were encountered: