Skip to content

Add CICD for nitro tensorrt llm version 0.7.1 #17

Add CICD for nitro tensorrt llm version 0.7.1

Add CICD for nitro tensorrt llm version 0.7.1 #17

name: Release for Windows
on:
push:
tags: ["windows-v[0-9]+.[0-9]+.[0-9]+-tensorrt-llm-v[0-9]+.[0-9]+.[0-9]+"]
jobs:
get-version:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
outputs:
version: ${{ steps.get_version.outputs.version }}
permissions:
contents: write
steps:
- name: Extract tag name without v prefix
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
env:
GITHUB_REF: ${{ github.ref }}
windows-build:
needs: get-version
runs-on: windows-nitro-tensorrt-llm-${{ matrix.cuda_arch_name }}
strategy:
matrix:
include:
# - cuda_arch: '80-real;86-real'
# cuda_arch_name: 'ampere'
# - cuda_arch: '89-real'
# cuda_arch_name: 'ada'
# - cuda_arch: '75-real'
# cuda_arch_name: 'turing'
- cuda_arch: '75-real;80-real;86-real;89-real'
cuda_arch_name: 'all'
permissions:
contents: write
steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
- name: Clone
id: checkout
uses: actions/checkout@v3
with:
submodules: recursive
lfs: true
- shell: bash
run: |
cp -r /c/w/nitro-tensorrt-llm/nitro-tensorrt-llm/cpp/tensorrt_llm/nitro C:/workspace/nitro-tensorrt-llm/cpp/tensorrt_llm
- uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
shell: powershell
command: |
cd C:\workspace\nitro-tensorrt-llm\cpp\tensorrt_llm\nitro; powershell -Command cmake -S ./nitro_deps -B ./build_deps/nitro_deps; powershell -Command cmake --build ./build_deps/nitro_deps --config Release
- name: Build nitro
shell: powershell
run: |
cd C:\workspace\nitro-tensorrt-llm\cpp\build
powershell -Command "cmake .. -DCMAKE_CUDA_ARCHITECTURES='${{ matrix.cuda_arch }}' -DTRT_LIB_DIR='C:/workspace/TensorRT-9.2.0.5/lib' -DTRT_INCLUDE_DIR='C:/workspace/TensorRT-9.2.0.5/include' -DBUILD_NITRO=ON -DCMAKE_CUDA_COMPILER='C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/bin/nvcc.exe' -DENABLE_MULTI_DEVICE=0 -G Ninja"
powershell -Command "cmake --build . --parallel 2 --config Release"
- name: create nitro artifact with dll file
shell: powershell
run: |
mkdir build_nitro
cp -Force C:\workspace\nitro-tensorrt-llm\cpp\build\tensorrt_llm\nitro\nitro.exe .\build_nitro
cp -Force C:\workspace\nitro-tensorrt-llm\cpp\build\tensorrt_llm\tensorrt_llm.dll .\build_nitro
cp -Force C:\workspace\nitro-tensorrt-llm\cpp\build\tensorrt_llm\plugins\nvinfer_plugin_tensorrt_llm.dll .\build_nitro
cp -Force C:\workspace\nitro-tensorrt-llm\cpp\tensorrt_llm\nitro\build_deps\_install\bin\zlib.dll .\build_nitro
cp -Force C:\workspace\cuDNN\bin\cudnn_ops_infer64_8.dll .\build_nitro
cp -Force C:\workspace\TensorRT-9.2.0.5\lib\nvinfer.dll .\build_nitro
cp -Force C:\Windows\System32\msmpi.dll .\build_nitro
cp -Force C:\workspace\cuDNN\bin\cudnn64_8.dll .\build_nitro
ls .\build_nitro
dotnet tool install --global AzureSignTool
C:\Users\ContainerAdministrator\.dotnet\tools\azuresigntool.exe sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\build_nitro\nitro.exe"
cd .\build_nitro
tar -czvf ..\nitro.tar.gz .\*
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nitro.tar.gz
asset_name: nitro-${{ needs.get-version.outputs.version }}-amd64-${{ matrix.cuda_arch_name }}-arch.tar.gz
tag: ${{ github.ref }}
overwrite: true
draft: true
release_name: ${{ github.ref }}