Skip to content

Commit

Permalink
支持CUDA12.4 #72
Browse files Browse the repository at this point in the history
  • Loading branch information
lwch committed Aug 12, 2024
1 parent d01e35a commit a764103
Showing 1 changed file with 65 additions and 4 deletions.
69 changes: 65 additions & 4 deletions .github/workflows/gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
libtorch_version: 2.4.0

jobs:
release_linux_118_glibc232:
release_linux_cu118_glibc232:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true

release_linux_121_glibc232:
release_linux_cu121_glibc232:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -68,7 +68,37 @@ jobs:
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true

release_linux_118_glibc231:
release_linux_cu124_glibc232:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: setup cuda
uses: Jimver/[email protected]
with:
cuda: '12.4.0'
method: network

- name: make
working-directory: ./lib
run: |
sudo apt-get install -y cmake
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-${{ env.libtorch_version }}%2Bcu124.zip
unzip -qq libtorch.zip
export TORCH_CUDA_ARCH_LIST="5.0 8.0 8.6 8.9 9.0"
cmake -DCMAKE_PREFIX_PATH=./libtorch -DCMAKE_BUILD_TYPE=Release .
make -j
mv libgotorch.so libgotorch_gpu.cu124.glibc232.so
- name: upload
uses: ncipollo/release-action@v1
with:
artifacts: ./lib/libgotorch_gpu.cu124.glibc232.so
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true

release_linux_cu118_glibc231:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -97,7 +127,7 @@ jobs:
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true

release_linux_121_glibc231:
release_linux_cu121_glibc231:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -126,4 +156,35 @@ jobs:
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true

release_linux_cu124_glibc231:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: setup cuda
uses: Jimver/[email protected]
with:
cuda: '12.4.0'
method: network

- name: make
working-directory: ./lib
env:
TORCH_CUDA_ARCH_LIST: "8.0 8.6 8.9 9.0"
run: |
sudo apt-get install -y cmake
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-${{ env.libtorch_version }}%2Bcu124.zip
unzip -qq libtorch.zip
cmake -DCMAKE_PREFIX_PATH=./libtorch -DCMAKE_BUILD_TYPE=Release .
make -j
mv libgotorch.so libgotorch_gpu.cu124.glibc231.so
- name: upload
uses: ncipollo/release-action@v1
with:
artifacts: ./lib/libgotorch_gpu.cu124.glibc231.so
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true

0 comments on commit a764103

Please sign in to comment.