gemini-code-assist[bot] commented on code in PR #19882:
URL: https://github.com/apache/tvm/pull/19882#discussion_r3470148008


##########
ci/scripts/package/manylinux_build_libtvm_runtime_cuda.sh:
##########
@@ -29,11 +27,21 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." 
&& pwd)"
 build_dir="${repo_root}/build-wheel-cuda"
 parallel="$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 4)"
 
+# Install the pinned CUDA toolkit into the manylinux_2_28 container. The RHEL8
+# local-repo RPM is compatible with manylinux_2_28 for both x86_64 and aarch64.
+arch="$(uname -m)"
+cuda_rpm="cuda-repo-rhel8-13-0-local-13.0.2_580.95.05-1.${arch}.rpm"
+curl -fsSLo "/tmp/${cuda_rpm}" \
+  
"https://developer.download.nvidia.com/compute/cuda/13.0.2/local_installers/${cuda_rpm}";

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   To prevent transient network issues from failing the CI build, it is 
recommended to add retry flags (`--retry 5 --retry-delay 5`) to the `curl` 
command when downloading the CUDA RPM.
   
   ```suggestion
   curl -fsSLo "/tmp/${cuda_rpm}" --retry 5 --retry-delay 5 \
     
"https://developer.download.nvidia.com/compute/cuda/13.0.2/local_installers/${cuda_rpm}";
   ```



##########
ci/scripts/package/manylinux_build_libtvm_runtime_cuda.sh:
##########
@@ -29,11 +27,21 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." 
&& pwd)"
 build_dir="${repo_root}/build-wheel-cuda"
 parallel="$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 4)"
 
+# Install the pinned CUDA toolkit into the manylinux_2_28 container. The RHEL8
+# local-repo RPM is compatible with manylinux_2_28 for both x86_64 and aarch64.
+arch="$(uname -m)"
+cuda_rpm="cuda-repo-rhel8-13-0-local-13.0.2_580.95.05-1.${arch}.rpm"
+curl -fsSLo "/tmp/${cuda_rpm}" \
+  
"https://developer.download.nvidia.com/compute/cuda/13.0.2/local_installers/${cuda_rpm}";
+rpm -i "/tmp/${cuda_rpm}"
+dnf clean all
+dnf -y --disablerepo=epel install cuda-toolkit-13-0
+rm -f "/tmp/${cuda_rpm}"
+dnf clean all
+
 # Build the CUDA runtime sidecar with CUDA on and LLVM off, so it does not need
-# the LLVM prefix; the main CPU wheel links LLVM statically. The manylinux CUDA
-# image already ships cmake and make, and the build uses the default Makefiles
-# generator (no Ninja), so no build tools are installed here. Put the bundled
-# CPython and CUDA toolchain on PATH for the CMake configure and nvcc.
+# the LLVM prefix; the main CPU wheel links LLVM statically. The manylinux 
image
+# ships no cmake/ninja, so install the build tools here.
 export PATH="/opt/python/cp310-cp310/bin:/usr/local/cuda/bin:${PATH}"
 nvcc --version

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   The comment on lines 43-44 states that the manylinux image ships without 
`cmake` or `ninja` and that they should be installed here, but the actual 
installation commands are missing. Since `/opt/python/cp310-cp310/bin` is added 
to the `PATH`, we can install them via `pip`.
   
   ```suggestion
   export PATH="/opt/python/cp310-cp310/bin:/usr/local/cuda/bin:${PATH}"
   pip install cmake ninja
   nvcc --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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to