diff --git a/.github/workflows/release_packages.yml b/.github/workflows/release_packages.yml index fb77cd8a..54f7d856 100644 --- a/.github/workflows/release_packages.yml +++ b/.github/workflows/release_packages.yml @@ -56,10 +56,14 @@ 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 @@ -67,11 +71,8 @@ jobs: 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 diff --git a/scripts/release/cpp_build_cuda.sh b/scripts/release/cpp_build_cuda.sh new file mode 100644 index 00000000..3b9232d9 --- /dev/null +++ b/scripts/release/cpp_build_cuda.sh @@ -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 diff --git a/scripts/release/python_manylinux_build_cuda.sh b/scripts/release/python_manylinux_build_cuda.sh index cd01b52d..32d3ee1e 100755 --- a/scripts/release/python_manylinux_build_cuda.sh +++ b/scripts/release/python_manylinux_build_cuda.sh @@ -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}"