Skip to content

Commit

Permalink
workflow: solve cuda cpp package build err
Browse files Browse the repository at this point in the history
  • Loading branch information
laiwenzh committed Dec 16, 2024
1 parent 50bdef5 commit 2353171
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,23 @@ jobs:
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
source /root/.bashrc
export AS_RELEASE_VERSION=$VERSION_NUMBER
export AS_BUILD_PACKAGE=ON
if command -v nvcc &> /dev/null
then
export AS_PLATFORM="cuda"
export AS_CUDA_SM="'70;75;80;86;89;90a'"
bash scripts/release/cpp_build_cuda.sh
else
# export ENABLE_MULTINUMA="ON"
if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
export AS_PLATFORM="armclang"
else
export AS_PLATFORM="x86"
fi
bash build.sh
fi
export AS_RELEASE_VERSION=$VERSION_NUMBER
export AS_BUILD_PACKAGE=ON
bash build.sh
- name: Upload tgz package
uses: actions/upload-artifact@v3
Expand Down
11 changes: 11 additions & 0 deletions scripts/release/cpp_build_cuda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e -x

CUDA_VERSION=$(nvcc --version | grep -oP 'release \K[\d.]+')

mkdir -p local_cuda_libs
ln -sf /usr/local/cuda-${CUDA_VERSION}/targets/x86_64-linux/lib/stubs/libnvidia-ml.so local_cuda_libs/libnvidia-ml.so.1
ln -sf /usr/local/cuda-${CUDA_VERSION}/compat/libcuda.so.1 local_cuda_libs/libcuda.so.1
export LD_LIBRARY_PATH=${PWD}/local_cuda_libs:${LD_LIBRARY_PATH}

bash build.sh
2 changes: 1 addition & 1 deletion scripts/release/python_manylinux_build_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e -x
# ALL_VERSION="3.8 3.9 3.10 3.11"
ALL_VERSION="3.8"
BUILD_VERSION=${@:-$ALL_VERSION}
CUDA_VERSION=12.4
CUDA_VERSION=$(nvcc --version | grep -oP 'release \K[\d.]+')

echo " going to build python wheels with version: ${BUILD_VERSION}"

Expand Down

0 comments on commit 2353171

Please sign in to comment.