Skip to content

优化gpu打包脚本 #76 #70

优化gpu打包脚本 #76

优化gpu打包脚本 #76 #70

Workflow file for this run

name: gpu_release
on:
push:
tags:
- "v*.*.*"
env:
libtorch_version: 2.6.0
jobs:
release_linux_cu118:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
include:
- os: ubuntu-20.04
name: glibc231
- os: ubuntu-22.04
name: glibc232
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: setup cuda
uses: Jimver/[email protected]
with:
cuda: '11.8.0'
method: network
- name: make
working-directory: ./lib
run: |
sudo apt-get clean
sudo apt-get install -y cmake
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-${{ env.libtorch_version }}%2Bcu118.zip
unzip -qq libtorch.zip
cmake -DCMAKE_PREFIX_PATH=./libtorch -DCMAKE_BUILD_TYPE=Release .
make -j
mv libgotorch.so libgotorch_gpu.cu118.${{ matrix.name }}.so
- name: upload
uses: ncipollo/release-action@v1
with:
artifacts: ./lib/libgotorch_gpu.cu118.${{ matrix.name }}.so
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true
release_linux_cu12x:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
cuda: [12.4.0, 12.6.0]
include:
- os: ubuntu-20.04
oname: glibc231
- os: ubuntu-22.04
oname: glibc232
- cuda: 12.4.0
cname: cu124
- cuda: 12.6.0
cname: cu126
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: setup cuda
uses: Jimver/[email protected]
with:
cuda: ${{ matrix.cuda }}
method: network
- name: make
working-directory: ./lib
run: |
sudo apt-get clean
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.${{ matrix.cname }}.${{ matrix.oname }}.so
- name: upload
uses: ncipollo/release-action@v1
with:
artifacts: ./lib/libgotorch_gpu.${{ matrix.cname }}.${{ matrix.oname }}.so
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true