diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 0000000000000..88e65d6e9273e --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,70 @@ +# Benchmark +name: Benchmark + +on: + workflow_dispatch: + inputs: + gpu-series: + description: 'Azure GPU series to run with' + required: true + type: choice + options: + - Standard_NC4as_T4_v3 + - Standard_NC64as_T4_v3 + - Standard_NC24ads_A100_v4 + - Standard_NC48ads_A100_v4 + - Standard_ND96asr_A100_v4 + - Standard_NC40ads_H100_v5 + - Standard_NC80adis_H100_v5 + push: + branches: + - master + paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*'] + pull_request: + types: [opened, synchronize, reopened] + paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*'] + schedule: + - cron: '0 0 * * *' + +jobs: + server-baseline: + runs-on: + group: azure-ubuntu-runners + labels: + - Standard_NC4as_T4_v3 + if: ${{ github.event.schedule || github.event.inputs.gpu-series == 'Standard_NC4as_T4_v3' || github.event.pull_request }} + steps: + - name: Clone + id: checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Dependencies + id: depends + run: | + apt-get update + apt-get -y install \ + build-essential \ + git \ + cmake \ + python3-pip \ + wget \ + language-pack-en \ + libcurl4-openssl-dev + + - name: Build + id: cmake_build + run: | + mkdir build + cd build + cmake .. \ + -DLLAMA_NATIVE=OFF \ + -DLLAMA_BUILD_SERVER=ON \ + -DLLAMA_CURL=ON \ + -DLLAMA_CUBLAS=ON \ + -DCMAKE_CUDA_ARCHITECTURES=native \ + -DLLAMA_FATAL_WARNINGS=OFF \ + -DLLAMA_ALL_WARNINGS=OFF \ + -DCMAKE_BUILD_TYPE=Release; + cmake --build . --config Release -j $(nproc) --target server