You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "MasterJH5574 (via GitHub)" <gi...@apache.org> on 2026/06/25 04:17:03 UTC

[PR] [CI][CMAKE] Install CUDA driver stub for libtvm_runtime_cuda [tvm]

MasterJH5574 opened a new pull request, #19886:
URL: https://github.com/apache/tvm/pull/19886

   The quay.io/manylinux_cuda image ships the CUDA toolkit but omits the libcuda driver stub (cuda-driver-devel). Without it CMake's FindCUDA leaves CUDA_CUDA_LIBRARY empty, and since a shared library links fine with undefined symbols, libtvm_runtime_cuda built with no libcuda.so.1 dependency -- ldd/readelf did not list it -- breaking downstream use.
   
   Install cuda-driver-devel-13-1 from the CUDA repo already configured in the image (a ~45 KB package with no dependencies, not the full toolkit download). The stub lands under /usr/local/cuda/.../stubs where FindCUDA looks, so the sidecar links libcuda.so.1 again.
   
   Also fail CMake configure with a clear error when CUDA_CUDA_LIBRARY is unset, so a missing driver stub can never again silently ship a runtime sidecar without its libcuda dependency.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] [CI][CMAKE] Install CUDA driver stub for libtvm_runtime_cuda [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen merged PR #19886:
URL: https://github.com/apache/tvm/pull/19886


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] [CI][CMAKE] Install CUDA driver stub for libtvm_runtime_cuda [tvm]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on code in PR #19886:
URL: https://github.com/apache/tvm/pull/19886#discussion_r3471860220


##########
ci/scripts/package/manylinux_build_libtvm_runtime_cuda.sh:
##########
@@ -29,6 +29,10 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
 build_dir="${repo_root}/build-wheel-cuda"
 parallel="$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 4)"
 
+# The image ships the toolkit but not the libcuda driver stub; install it from
+# the image's CUDA repo so the sidecar links libcuda.so.1 (sync version with tag).
+dnf -y install cuda-driver-devel-13-1

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   Hardcoding the CUDA version as `13-1` is fragile and will break if the base image's CUDA version changes (or if `13-1` is a typo for `12-1` or another version). Instead of hardcoding, we can dynamically detect the preinstalled CUDA version from `nvcc` and install the matching `cuda-driver-devel` package.
   
   ```suggestion
   cuda_version=$(/usr/local/cuda/bin/nvcc --version | sed -n 's/.*release \([0-9]\+\.[0-9]\+\).*/\1/p' | tr '.' '-')
   dnf -y install "cuda-driver-devel-${cuda_version}"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] [CI][CMAKE] Install CUDA driver stub for libtvm_runtime_cuda [tvm]

Posted by "hcho3 (via GitHub)" <gi...@apache.org>.
hcho3 commented on PR #19886:
URL: https://github.com/apache/tvm/pull/19886#issuecomment-4804826601

   Hello, I went ahead and updated the `manylinux_cuda` images to install the CUDA driver stub libraries: https://github.com/gpu-ci-demo/manylinux-cuda-container/commit/b6483f108bc3acc68cb3633d8bbd4d1d2b9acf31


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org